linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v4 6/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable()
Date: Mon, 29 Jan 2024 15:25:57 +0000	[thread overview]
Message-ID: <20240129152557.3221212-6-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20240129152557.3221212-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>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---

No change since v3.

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 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);
 
-- 
2.30.2


  parent reply	other threads:[~2024-01-29 15:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 15:25 [PATCH v4 1/6] spi: cs42l43: Tidy up header includes Charles Keepax
2024-01-29 15:25 ` [PATCH v4 2/6] mfd: " Charles Keepax
2024-01-29 15:25 ` [PATCH v4 3/6] mfd: cs42l43: Use __u8 type rather than u8 for firmware interface Charles Keepax
2024-01-29 15:25 ` [PATCH v4 4/6] mfd: cs42l43: Add time postfixes on defines Charles Keepax
2024-01-29 15:25 ` [PATCH v4 5/6] mfd: cs42l43: Add some missing dev_err_probe()s Charles Keepax
2024-01-29 15:25 ` Charles Keepax [this message]
2024-02-08  9:04 ` [PATCH v4 1/6] spi: cs42l43: Tidy up header includes Lee Jones
2024-02-08 10:16 ` (subset) " Lee Jones
2024-02-08 13:35   ` Charles Keepax
2024-02-08 13:57     ` Lee Jones
2024-02-08 13:59       ` Mark Brown
2024-02-08 14:13 ` Lee Jones
2024-02-08 17:40   ` Charles Keepax
2024-02-08 17:46     ` Lee Jones

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=20240129152557.3221212-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).