提交 c8e38668 编写于 作者: W Wei Yongjun 提交者: Will Deacon

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: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210312080421.277562-1-weiyongjun1@huawei.comSigned-off-by: NWill Deacon <will@kernel.org>
上级 30b26757
...@@ -681,6 +681,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev) ...@@ -681,6 +681,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev)
if (!name) { if (!name) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Create name failed, PMU @%pa\n", &res->start); "Create name failed, PMU @%pa\n", &res->start);
ret = -ENOMEM;
goto out_teardown_dev; goto out_teardown_dev;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册