From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <lee@kernel.org>, <broonie@kernel.org>
Cc: <andy.shevchenko@gmail.com>, <patches@opensource.cirrus.com>,
<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>
Subject: [PATCH v3 6/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable()
Date: Thu, 25 Jan 2024 10:25:55 +0000 [thread overview]
Message-ID: <20240125102555.2621736-6-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20240125102555.2621736-1-ckeepax@opensource.cirrus.com>
As it devm_pm_runtime_enable() can fail due to memory allocations, it
is best to handle the error.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
No changes since v2.
Thanks,
Charles
drivers/mfd/cs42l43.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c
index aea0f8f485785..56bd9dbbe10b0 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);
--
2.30.2
prev parent reply other threads:[~2024-01-25 10:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 10:25 [PATCH v3 1/6] spi: cs42l43: Tidy up header includes Charles Keepax
2024-01-25 10:25 ` [PATCH v3 2/6] mfd: " Charles Keepax
2024-01-25 13:55 ` Lee Jones
2024-01-25 18:54 ` Andy Shevchenko
2024-01-26 9:06 ` Lee Jones
2024-01-25 18:52 ` Andy Shevchenko
2024-01-25 10:25 ` [PATCH v3 3/6] mfd: cs42l43: Use __u8 type rather than u8 for firmware interface Charles Keepax
2024-01-25 10:25 ` [PATCH v3 4/6] mfd: cs42l43: Add time postfixes on defines Charles Keepax
2024-01-25 18:49 ` Andy Shevchenko
2024-01-25 10:25 ` [PATCH v3 5/6] mfd: cs42l43: Add some missing dev_err_probe()s Charles Keepax
2024-01-25 10:25 ` Charles Keepax [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240125102555.2621736-6-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).