* [PATCH next] clk: mmp: pxa1908: Fix IS_ERR() vs NULL check in probe()
@ 2025-09-26 4:03 Dan Carpenter
2025-09-26 18:37 ` Duje Mihanović
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-09-26 4:03 UTC (permalink / raw)
To: Duje Mihanović
Cc: Michael Turquette, Stephen Boyd, linux-arm-kernel, linux-clk,
linux-kernel, kernel-janitors
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-26 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 4:03 [PATCH next] clk: mmp: pxa1908: Fix IS_ERR() vs NULL check in probe() Dan Carpenter
2025-09-26 18:37 ` Duje Mihanović
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).