Commit c8e38668 authored by Wei Yongjun's avatar Wei Yongjun Committed by Will Deacon
Browse files

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: 53c218da ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210312080421.277562-1-weiyongjun1@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 30b26757
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}