Skip to content

Commit f9f4b0c

Browse files
charleskeepaxbroonie
authored andcommitted
spi: cs42l43: Handle error from devm_pm_runtime_enable
As it devm_pm_runtime_enable can fail due to memory allocations, it is best to handle the error. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2f8c7c3 commit f9f4b0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/spi/spi-cs42l43.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ static int cs42l43_spi_probe(struct platform_device *pdev)
244244
priv->ctlr->use_gpio_descriptors = true;
245245
priv->ctlr->auto_runtime_pm = true;
246246

247-
devm_pm_runtime_enable(priv->dev);
247+
ret = devm_pm_runtime_enable(priv->dev);
248+
if (ret)
249+
return ret;
250+
248251
pm_runtime_idle(priv->dev);
249252

250253
regmap_write(priv->regmap, CS42L43_TRAN_CONFIG6, CS42L43_FIFO_SIZE - 1);

0 commit comments

Comments
 (0)