Commit cab2ce7f authored by Charles Keepax's avatar Charles Keepax Committed by Lee Jones

mfd: 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>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240129152557.3221212-6-ckeepax@opensource.cirrus.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent d92b9bcf
......@@ -1065,7 +1065,9 @@ int cs42l43_dev_probe(struct cs42l43 *cs42l43)
* the boot work runs.
*/
pm_runtime_get_noresume(cs42l43->dev);
devm_pm_runtime_enable(cs42l43->dev);
ret = devm_pm_runtime_enable(cs42l43->dev);
if (ret)
return ret;
queue_work(system_long_wq, &cs42l43->boot_work);
......
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