Skip to content

Commit c6662f9

Browse files
griffinkhgregkh
authored andcommitted
fpga: dfl: fme: add error handling
commit b5ba63e upstream. Add error handling to devm_kasprint in fme_perf_pmu_register(). Assisted-by: gkh_clanker_2000 Fixes: 724142f ("fpga: dfl: fme: add performance reporting support") Cc: 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> [ Yilun: Fix stable tag, add Fixes tag ] Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/2026070620-unwired-clay-f6cc@gregkh Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 74b301f commit c6662f9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/fpga/dfl-fme-perf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,8 @@ static int fme_perf_pmu_register(struct platform_device *pdev,
925925
PERF_PMU_CAP_NO_EXCLUDE;
926926

927927
name = devm_kasprintf(priv->dev, GFP_KERNEL, "dfl_fme%d", pdev->id);
928+
if (!name)
929+
return -ENOMEM;
928930

929931
ret = perf_pmu_register(pmu, name, -1);
930932
if (ret)

0 commit comments

Comments
 (0)