mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: lmk04832: Handle reset GPIO lookup errors
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: 3bc61cfd6f ("clk: add support for the lmk04832")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20261006110501.57051-1-phucduc.bui@gmail.com
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
fcfe685cde
commit
5c7c0cbf81
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user