From: Chanwoo Choi <cwchoi00@gmail.com>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>
Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] PM / devfreq: tegra30: Add error message for devm_devfreq_add_device()
Date: Fri, 8 Jul 2022 04:13:19 +0900 [thread overview]
Message-ID: <37298477-b25d-ce84-67eb-091f6e0e5f73@gmail.com> (raw)
In-Reply-To: <20220630075751.1360786-1-dmitry.osipenko@collabora.com>
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
prev parent reply other threads:[~2022-07-07 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 7:57 Dmitry Osipenko
2022-07-07 19:13 ` Chanwoo Choi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37298477-b25d-ce84-67eb-091f6e0e5f73@gmail.com \
--to=cwchoi00@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=dmitry.osipenko@collabora.com \
--cc=jonathanh@nvidia.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®