Skip to contentSkip to conversation

patch "iio: light: veml6070: fix veml6070_read() return value" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Mar 29

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    iio: light: veml6070: fix veml6070_read() return value

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From d0b224cf9ab12e86a4d1ca55c760dfaa5c19cbe7 Mon Sep 17 00:00:00 2001
From: Aldo Conte <[email protected]>
Date: Wed, 25 Mar 2026 12:32:16 +0100
Subject: iio: light: veml6070: fix veml6070_read() return value
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

veml6070_read() computes the sensor value in ret but returns 0 instead of the actual result. This causes veml6070_read_raw() to always report 0.

Return the computed value instead of 0.

Running make W=1 returns no errors. I was unable to test the patch because I do not have the hardware. Found by code inspection.

Fixes fc38525135dd ("iio: light: veml6070: use guard to handle mutex")
---
 drivers/iio/light/veml6070.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/light/veml6070.c +1 -3
index 6d4483c85f30..74d7246e5225 100644
@@ -134,9 +134,7 @@ static int veml6070_read(struct veml6070_data *data)
 	if (ret < 0)
 		return ret;
 
-	ret = (msb << 8) | lsb;
-
-	return 0;
+	return (msb << 8) | lsb;
 }
 
 static const struct iio_chan_spec veml6070_channels[] = {
Signature · 1 line
2.53.0