Commit 53f853d5 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Chanwoo Choi
Browse files

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: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 2472934e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}