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>
This commit is contained in:
committed by
Chanwoo Choi
parent
2472934e36
commit
53f853d55e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user