Skip to content

Commit

Permalink
PM / devfreq: tegra30: Add error message for devm_devfreq_add_device()
Browse files Browse the repository at this point in the history
It's difficult to notice that driver failed to probe by looking at KMSG
when devm_devfreq_add_device() fails. Add explicit error message for this
case.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
  • Loading branch information
Dmitry Osipenko authored and Chanwoo Choi committed Jul 15, 2022
1 parent 2472934 commit 53f853d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/devfreq/tegra30-devfreq.c
Original file line number Diff line number Diff line change
@@ -922,8 +922,10 @@ static int tegra_devfreq_probe(struct platform_device *pdev)

devfreq = devm_devfreq_add_device(&pdev->dev, &tegra_devfreq_profile,
"tegra_actmon", NULL);
if (IS_ERR(devfreq))
if (IS_ERR(devfreq)) {
dev_err(&pdev->dev, "Failed to add device: %pe\n", devfreq);
return PTR_ERR(devfreq);
}

return 0;
}

0 comments on commit 53f853d

Please sign in to comment.