patch "iio:proximity:sx9324: Check ret value of" added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio:proximity:sx9324: Check ret value of
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 70171ed6dc53d2f580166d47f5b66cf51a6d0092 Mon Sep 17 00:00:00 2001
From: Aashish Sharma <[email protected]>
Date: Mon, 13 Jun 2022 16:22:24 -0700
Subject: iio:proximity:sx9324: Check ret value of
device_property_read_u32_array()
0-day reports:
drivers/iio/proximity/sx9324.c:868:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
Put an if condition to break out of switch if ret is non-zero.
--- drivers/iio/proximity/sx9324.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/iio/proximity/sx9324.c +3 -0
@@ -885,6 +885,9 @@ sx9324_get_default_reg(struct device *dev, int idx,break ; ret =device_property_read_u32_array (dev, prop, pin_defs,ARRAY_SIZE (pin_defs)); +if (ret) +break ; +for (pin =0 ; pin <SX9324_NUM_PINS ; pin++) raw |= (pin_defs[pin] << (2 * pin)) &SX9324_REG_AFE_PH0_PIN_MASK (pin);
Signature · 1 line
2.36.1