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: <20260204061219.791037-4-harshit.m.mogalapalli@oracle.com>
Date: Tue,  3 Feb 2026 22:11:58 -0800
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
        Nuno Sá <nuno.sa@...log.com>,
        Andy Shevchenko <andy@...nel.org>,
        Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
        Antoniu Miclaus <antoniu.miclaus@...log.com>,
        Andrew Ijano <andrew.ijano@...il.com>, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, error27@...il.com,
        andriy.shevchenko@...el.com
Subject: [PATCH v4 next 3/6] iio: sca3000: make stop_all_interrupts() return void

sca3000_stop_all_interrupts() is called only from the driver remove
path and its return value is discarded, so convert the helper to return
void.

No functional change.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
---
 drivers/iio/accel/sca3000.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
index 4bad152009e8..f9680071bbbe 100644
--- a/drivers/iio/accel/sca3000.c
+++ b/drivers/iio/accel/sca3000.c
@@ -1495,22 +1495,21 @@ static int sca3000_probe(struct spi_device *spi)
 	return 0;
 }
 
-static int sca3000_stop_all_interrupts(struct sca3000_state *st)
+static void sca3000_stop_all_interrupts(struct sca3000_state *st)
 {
 	int ret;
 
 	mutex_lock(&st->lock);
 	ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1);
 	if (ret)
-		goto error_ret;
-	ret = sca3000_write_reg(st, SCA3000_REG_INT_MASK_ADDR,
-				(st->rx[0] &
-				 ~(SCA3000_REG_INT_MASK_RING_THREE_QUARTER |
-				   SCA3000_REG_INT_MASK_RING_HALF |
-				   SCA3000_REG_INT_MASK_ALL_INTS)));
-error_ret:
+		goto out_unlock;
+	sca3000_write_reg(st, SCA3000_REG_INT_MASK_ADDR,
+			  (st->rx[0] &
+			   ~(SCA3000_REG_INT_MASK_RING_THREE_QUARTER |
+			     SCA3000_REG_INT_MASK_RING_HALF |
+			     SCA3000_REG_INT_MASK_ALL_INTS)));
+out_unlock:
 	mutex_unlock(&st->lock);
-	return ret;
 }
 
 static void sca3000_remove(struct spi_device *spi)
-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ