Re: [PATCH] fpga: dfl: fme: add error handling
Xu Yilun <[email protected]> Tue, 7 Jul 2026 12:47:16 +0800
| Newsgroups | org.kernel.vger.linux-fpga,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <akyE1DyCAdtxbwqr@yilunxu-OptiPlex-7050> |
On Mon, Jul 06, 2026 at 04:58:21PM +0200, Greg Kroah-Hartman wrote: > From: Griffin Kroah-Hartman <[email protected]> > > 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 <[email protected]> Changed to Cc: [email protected], or checkpatch will complain. > Cc: Xu Yilun <[email protected]> > Cc: Tom Rix <[email protected]> > Cc: Moritz Fischer <[email protected]> > Signed-off-by: Griffin Kroah-Hartman <[email protected]> > Signed-off-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Xu Yilun <[email protected]> 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 > >