summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-06-30 09:57:51 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2022-07-15 04:40:08 +0200
commit53f853d55e312a639eaa910154248ce06eb754ac (patch)
tree22883bf2b4c17a90fcc3b0e5b9aa60b9ec37d86c /drivers/devfreq
parentPM / devfreq: imx-bus: use NULL to pass a null pointer rather than zero (diff)
downloadlinux-53f853d55e312a639eaa910154248ce06eb754ac.tar.xz
linux-53f853d55e312a639eaa910154248ce06eb754ac.zip
PM / devfreq: tegra30: Add error message for devm_devfreq_add_device()
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>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/tegra30-devfreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index 65ecf17a36f4..585a95fe2bd6 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -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;
}