* [PATCH] fpga: dfl: fme: add error handling
@ 2026-07-06 14:58 Greg Kroah-Hartman
2026-07-07 4:47 ` Xu Yilun
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-06 14:58 UTC (permalink / raw)
To: linux-fpga
Cc: linux-kernel, Griffin Kroah-Hartman, stable, Xu Yilun, Tom Rix,
Moritz Fischer, Greg Kroah-Hartman
From: Griffin Kroah-Hartman <griffin@kroah.com>
Add error handling to devm_kasprint in fme_perf_pmu_register().
Assisted-by: gkh_clanker_2000
Cc: stable <stable@kernel.org>
Cc: Xu Yilun <yilun.xu@intel.com>
Cc: Tom Rix <trix@redhat.com>
Cc: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/fpga/dfl-fme-perf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/fpga/dfl-fme-perf.c b/drivers/fpga/dfl-fme-perf.c
index 7422d2bc6f37..db56d52411ef 100644
--- a/drivers/fpga/dfl-fme-perf.c
+++ b/drivers/fpga/dfl-fme-perf.c
@@ -925,6 +925,8 @@ static int fme_perf_pmu_register(struct platform_device *pdev,
PERF_PMU_CAP_NO_EXCLUDE;
name = devm_kasprintf(priv->dev, GFP_KERNEL, "dfl_fme%d", pdev->id);
+ if (!name)
+ return -ENOMEM;
ret = perf_pmu_register(pmu, name, -1);
if (ret)
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fpga: dfl: fme: add error handling
2026-07-06 14:58 [PATCH] fpga: dfl: fme: add error handling Greg Kroah-Hartman
@ 2026-07-07 4:47 ` Xu Yilun
0 siblings, 0 replies; 2+ messages in thread
From: Xu Yilun @ 2026-07-07 4:47 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-fpga, linux-kernel, Griffin Kroah-Hartman, stable,
Xu Yilun, Tom Rix, Moritz Fischer
On Mon, Jul 06, 2026 at 04:58:21PM +0200, Greg Kroah-Hartman wrote:
> From: Griffin Kroah-Hartman <griffin@kroah.com>
>
> Add error handling to devm_kasprint in fme_perf_pmu_register().
Actually perf_pmu_register() will handle the !name, but good to change
it for readability.
>
> Assisted-by: gkh_clanker_2000
Fixes: 724142f8c42a ("fpga: dfl: fme: add performance reporting support")
> Cc: stable <stable@kernel.org>
Changed to Cc: stable@kernel.org, or checkpatch will complain.
> Cc: Xu Yilun <yilun.xu@intel.com>
> Cc: Tom Rix <trix@redhat.com>
> Cc: Moritz Fischer <mdf@kernel.org>
> Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
I fixed the tags inplace, and applied to for-next.
Thanks,
Yilun
> ---
> drivers/fpga/dfl-fme-perf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/fpga/dfl-fme-perf.c b/drivers/fpga/dfl-fme-perf.c
> index 7422d2bc6f37..db56d52411ef 100644
> --- a/drivers/fpga/dfl-fme-perf.c
> +++ b/drivers/fpga/dfl-fme-perf.c
> @@ -925,6 +925,8 @@ static int fme_perf_pmu_register(struct platform_device *pdev,
> PERF_PMU_CAP_NO_EXCLUDE;
>
> name = devm_kasprintf(priv->dev, GFP_KERNEL, "dfl_fme%d", pdev->id);
> + if (!name)
> + return -ENOMEM;
>
> ret = perf_pmu_register(pmu, name, -1);
> if (ret)
> --
> 2.55.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-07 4:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-06 14:58 [PATCH] fpga: dfl: fme: add error handling Greg Kroah-Hartman
2026-07-07 4:47 ` Xu Yilun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®