Skip to content

Commit

Permalink
perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit c8e3866 ]

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 53c218d ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210312080421.277562-1-weiyongjun1@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Wei Yongjun authored and gregkh committed Mar 17, 2021
1 parent aba4bdd commit 828a2cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/perf/arm_dmc620_pmu.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 828a2cf

Please sign in to comment.