From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Duje Mihanović" <duje@dujemihanovic.xyz>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH next] clk: mmp: pxa1908: Fix IS_ERR() vs NULL check in probe()
Date: Fri, 26 Sep 2025 07:03:21 +0300 [thread overview]
Message-ID: <aNYQiRJDmOO0mEWs@stanley.mountain> (raw)
The devm_auxiliary_device_create() function returns NULL on error, it
never returns error pointers. Change the IS_ERR() check to a NULL check.
Fixes: a787ab591c38 ("clk: mmp: pxa1908: Instantiate power driver through auxiliary bus")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/clk/mmp/clk-pxa1908-apmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mmp/clk-pxa1908-apmu.c b/drivers/clk/mmp/clk-pxa1908-apmu.c
index 7594a495a009..e374d7733f56 100644
--- a/drivers/clk/mmp/clk-pxa1908-apmu.c
+++ b/drivers/clk/mmp/clk-pxa1908-apmu.c
@@ -97,8 +97,8 @@ static int pxa1908_apmu_probe(struct platform_device *pdev)
return PTR_ERR(pxa_unit->base);
adev = devm_auxiliary_device_create(&pdev->dev, "power", NULL);
- if (IS_ERR(adev))
- return dev_err_probe(&pdev->dev, PTR_ERR(adev),
+ if (!adev)
+ return dev_err_probe(&pdev->dev, -ENODEV,
"Failed to register power controller\n");
mmp_clk_init(pdev->dev.of_node, &pxa_unit->unit, APMU_NR_CLKS);
--
2.51.0
next reply other threads:[~2025-09-26 4:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 4:03 Dan Carpenter [this message]
2025-09-26 18:37 ` [PATCH next] clk: mmp: pxa1908: Fix IS_ERR() vs NULL check in probe() Duje Mihanović
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=aNYQiRJDmOO0mEWs@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=duje@dujemihanovic.xyz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.