[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250206175114.1974171-30-bvanassche@acm.org>
Date: Thu, 6 Feb 2025 09:51:10 -0800
From: Bart Van Assche <bvanassche@....org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Will Deacon <will@...nel.org>,
Christoph Hellwig <hch@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marco Elver <elver@...gle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Kees Cook <kees@...nel.org>,
Jann Horn <jannh@...gle.com>,
linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Frank Crawford <frank@...wford.emu.id.au>,
Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH RFC 29/33] hwmon: (it87) Check the it87_lock() return value
Return early in it87_resume() if it87_lock() fails instead of ignoring the
return value of that function. This patch suppresses a Clang thread-safety
warning.
Cc: Frank Crawford <frank@...wford.emu.id.au>
Cc: Guenter Roeck <linux@...ck-us.net>
Fixes: 376e1a937b30 ("hwmon: (it87) Add calls to smbus_enable/smbus_disable as required")
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
drivers/hwmon/it87.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index e233aafa8856..8e3935089fca 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -3593,7 +3593,9 @@ static int it87_resume(struct device *dev)
it87_resume_sio(pdev);
- it87_lock(data);
+ int err = it87_lock(data);
+ if (err)
+ return err;
it87_check_pwm(dev);
it87_check_limit_regs(data);
Powered by blists - more mailing lists