* [PATCH v1] PM / devfreq: tegra30: Add error message for devm_devfreq_add_device()
@ 2022-06-30 7:57 Dmitry Osipenko
2022-07-07 19:13 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2022-06-30 7:57 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter, MyungJoo Ham, Kyungmin Park,
Chanwoo Choi
Cc: linux-tegra, linux-pm, linux-kernel
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>
---
drivers/devfreq/tegra30-devfreq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index 30382bdfc655..f0d414b881e3 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -926,8 +926,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;
}
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] PM / devfreq: tegra30: Add error message for devm_devfreq_add_device()
2022-06-30 7:57 [PATCH v1] PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() Dmitry Osipenko
@ 2022-07-07 19:13 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2022-07-07 19:13 UTC (permalink / raw)
To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter, MyungJoo Ham,
Kyungmin Park, Chanwoo Choi
Cc: linux-tegra, linux-pm, linux-kernel
On 22. 6. 30. 16:57, Dmitry Osipenko wrote:
> 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>
> ---
> drivers/devfreq/tegra30-devfreq.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
> index 30382bdfc655..f0d414b881e3 100644
> --- a/drivers/devfreq/tegra30-devfreq.c
> +++ b/drivers/devfreq/tegra30-devfreq.c
> @@ -926,8 +926,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;
> }
Applied it. Thanks.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-07 19:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 7:57 [PATCH v1] PM / devfreq: tegra30: Add error message for devm_devfreq_add_device() Dmitry Osipenko
2022-07-07 19:13 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).