* [PATCH] clk: lmk04832: Handle reset GPIO lookup errors
@ 2026-10-06 11:05 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-10-06 11:05 UTC (permalink / raw)
To: Stephen Boyd, linux-clk, linux-kernel
Cc: Brian Masney, Jerome Brunet, Liam Beguin, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
devm_gpiod_get_optional() may return -EPROBE_DEFER or other errors,
but lmk04832_probe() currently ignores them.
Check the return value and propagate errors from the reset GPIO lookup.
Fixes: 3bc61cfd6f4a ("clk: add support for the lmk04832")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/clk/clk-lmk04832.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index f9a0684d2628..81801ccb2675 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -1410,6 +1410,9 @@ static int lmk04832_probe(struct spi_device *spi)
lmk->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
GPIOD_OUT_LOW);
+ if (IS_ERR(lmk->reset_gpio))
+ return dev_err_probe(lmk->dev, PTR_ERR(lmk->reset_gpio),
+ "failed to get reset GPIO\n");
lmk->dclk = devm_kcalloc(lmk->dev, info->num_channels >> 1,
sizeof(struct lmk_dclk), GFP_KERNEL);
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-06 11:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 11:05 [PATCH] clk: lmk04832: Handle reset GPIO lookup errors phucduc.bui
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®