lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240125102555.2621736-6-ckeepax@opensource.cirrus.com>
Date: Thu, 25 Jan 2024 10:25:55 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: <lee@...nel.org>, <broonie@...nel.org>
CC: <andy.shevchenko@...il.com>, <patches@...nsource.cirrus.com>,
        <linux-kernel@...r.kernel.org>, <linux-spi@...r.kernel.org>
Subject: [PATCH v3 6/6] 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 <andy.shevchenko@...il.com>
Signed-off-by: Charles Keepax <ckeepax@...nsource.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ