aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Keepax <[email protected]>2024-01-29 15:25:57 +0000
committerLee Jones <[email protected]>2024-02-23 14:58:02 +0000
commitcab2ce7fce877dfd27af6eab0d7a36ee068dddda (patch)
treef9d7c9f4c10478a69022433a8b277b1e9ed12a3f
parentd92b9bcfce940ec7f330980b042d26787c9570ea (diff)
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: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
-rw-r--r--drivers/mfd/cs42l43.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index aea0f8f48578..56bd9dbbe10b 100644
--- a/drivers/mfd/cs42l43.c
+++ b/drivers/mfd/cs42l43.c
@@ -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);