aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <[email protected]>2021-03-12 08:04:21 +0000
committerWill Deacon <[email protected]>2021-03-12 11:30:31 +0000
commitc8e3866836528a4ba3b0535834f03768d74f7d8e (patch)
tree165a408b03b5f51cb35195f96b382cfc96bc1e93
parent30b2675761b8a1a2b6ef56b535ef51b789bb7150 (diff)
perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe()
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 53c218da220c ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--drivers/perf/arm_dmc620_pmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm_dmc620_pmu.c b/drivers/perf/arm_dmc620_pmu.c
index 66ad5b3ece19..f2a85500258d 100644
--- a/drivers/perf/arm_dmc620_pmu.c
+++ b/drivers/perf/arm_dmc620_pmu.c
@@ -681,6 +681,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev)
if (!name) {
dev_err(&pdev->dev,
"Create name failed, PMU @%pa\n", &res->start);
+ ret = -ENOMEM;
goto out_teardown_dev;
}