From: Jon Hunter <jonathanh@nvidia.com>
To: Sheetal <sheetal@nvidia.com>,
Thierry Reding <thierry.reding@kernel.org>,
linux-tegra@vger.kernel.org
Cc: Mohan Kumar <mkumard@nvidia.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bus: tegra-aconnect: Use dev_err_probe for probe error paths
Date: Thu, 2 Apr 2026 09:16:52 +0100 [thread overview]
Message-ID: <480eb30f-774a-4f1d-bb70-13c1b771561b@nvidia.com> (raw)
In-Reply-To: <20260318071129.1758058-1-sheetal@nvidia.com>
On 18/03/2026 07:11, Sheetal wrote:
> Convert probe error handling to use dev_err_probe() which provides
> proper handling of -EPROBE_DEFER.
>
> Signed-off-by: Sheetal <sheetal@nvidia.com>
> ---
> drivers/bus/tegra-aconnect.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/bus/tegra-aconnect.c b/drivers/bus/tegra-aconnect.c
> index 90e3b0a10816..9b2b227332b2 100644
> --- a/drivers/bus/tegra-aconnect.c
> +++ b/drivers/bus/tegra-aconnect.c
> @@ -32,16 +32,14 @@ static int tegra_aconnect_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> aconnect->ape_clk = devm_clk_get(&pdev->dev, "ape");
> - if (IS_ERR(aconnect->ape_clk)) {
> - dev_err(&pdev->dev, "Can't retrieve ape clock\n");
> - return PTR_ERR(aconnect->ape_clk);
> - }
> + if (IS_ERR(aconnect->ape_clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->ape_clk),
> + "can't retrieve ape clock\n");
>
> aconnect->apb2ape_clk = devm_clk_get(&pdev->dev, "apb2ape");
> - if (IS_ERR(aconnect->apb2ape_clk)) {
> - dev_err(&pdev->dev, "Can't retrieve apb2ape clock\n");
> - return PTR_ERR(aconnect->apb2ape_clk);
> - }
> + if (IS_ERR(aconnect->apb2ape_clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->apb2ape_clk),
> + "can't retrieve apb2ape clock\n");
>
> dev_set_drvdata(&pdev->dev, aconnect);
> pm_runtime_enable(&pdev->dev);
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Thanks!
Jon
--
nvpublic
prev parent reply other threads:[~2026-04-02 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 7:11 [PATCH] bus: tegra-aconnect: Use dev_err_probe for probe error paths Sheetal
2026-04-02 8:16 ` Jon Hunter [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=480eb30f-774a-4f1d-bb70-13c1b771561b@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
/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