Commit f9f4b0c6 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

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: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://msgid.link/r/20240124174101.2270249-1-ckeepax@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2f8c7c37
...@@ -244,7 +244,10 @@ static int cs42l43_spi_probe(struct platform_device *pdev) ...@@ -244,7 +244,10 @@ static int cs42l43_spi_probe(struct platform_device *pdev)
priv->ctlr->use_gpio_descriptors = true; priv->ctlr->use_gpio_descriptors = true;
priv->ctlr->auto_runtime_pm = true; priv->ctlr->auto_runtime_pm = true;
devm_pm_runtime_enable(priv->dev); ret = devm_pm_runtime_enable(priv->dev);
if (ret)
return ret;
pm_runtime_idle(priv->dev); pm_runtime_idle(priv->dev);
regmap_write(priv->regmap, CS42L43_TRAN_CONFIG6, CS42L43_FIFO_SIZE - 1); regmap_write(priv->regmap, CS42L43_TRAN_CONFIG6, CS42L43_FIFO_SIZE - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment