All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: lmk04832: Handle reset GPIO lookup errors
@ 2026-10-06 11:05 phucduc.bui
  2026-10-07  9:30 ` Jerome Brunet
  0 siblings, 1 reply; 2+ messages 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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: lmk04832: Handle reset GPIO lookup errors
  2026-10-06 11:05 [PATCH] clk: lmk04832: Handle reset GPIO lookup errors phucduc.bui
@ 2026-10-07  9:30 ` Jerome Brunet
  0 siblings, 0 replies; 2+ messages in thread
From: Jerome Brunet @ 2026-10-07  9:30 UTC (permalink / raw)
  To: Stephen Boyd, linux-clk, linux-kernel, phucduc.bui
  Cc: Brian Masney, Jerome Brunet, Liam Beguin

Applied to clk/linux.git (clk-next), thanks!

[1/1] clk: lmk04832: Handle reset GPIO lookup errors
      commit: da51c9a6f60ab1eead089c23448c9ee6a192635b

Best regards,
--
Jerome


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-07  9:30 UTC | newest]

Thread overview: 2+ messages (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
2026-10-07  9:30 ` Jerome Brunet

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.