All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <lee@kernel.org>, <broonie@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>,
	<linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>
Subject: [PATCH 5/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable
Date: Wed, 24 Jan 2024 15:12:21 +0000	[thread overview]
Message-ID: <20240124151222.1448570-5-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20240124151222.1448570-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>
---
 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


  parent reply	other threads:[~2024-01-24 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 15:12 [PATCH 1/6] mfd: cs42l43: Tidy up header includes Charles Keepax
2024-01-24 15:12 ` [PATCH 2/6] mfd: cs42l43: Use __u8 type rather than u8 for firmware interface Charles Keepax
2024-01-24 15:12 ` [PATCH 3/6] mfd: cs42l43: Add time postfixes on defines Charles Keepax
2024-01-24 15:12 ` [PATCH 4/6] mfd: cs42l43: Add some missing dev_err_probes Charles Keepax
2024-01-24 15:12 ` Charles Keepax [this message]
2024-01-24 15:12 ` [PATCH 6/6] spi: cs42l43: Tidy up header includes Charles Keepax
2024-01-24 15:16   ` Mark Brown
2024-01-24 15:20     ` Charles Keepax
2024-01-24 15:20 ` [PATCH 1/6] mfd: " Charles Keepax
2024-01-24 20:31   ` Andy Shevchenko

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=20240124151222.1448570-5-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.