]> git.baikalelectronics.ru Git - kernel.git/commit
iio:proximity:sx9324: Check ret value of device_property_read_u32_array()
authorAashish Sharma <shraash@google.com>
Mon, 13 Jun 2022 23:22:24 +0000 (16:22 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Jun 2022 16:22:49 +0000 (17:22 +0100)
commitc0352f84a037f1fc195225107852fec513fd1da2
tree8cc944ee630b8d5aa1638b0cfe6843d99643a755
parentb45174f846df575c62dca9885ab029f8f7f0ff4b
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.

Signed-off-by: Aashish Sharma <shraash@google.com>
Fixes: 6e0ea292af20 ("iio:proximity:sx9324: Add dt_binding support")
Reported-by: kernel test robot <lkp@intel.com>
[swboyd@chromium.org: Reword commit subject, add fixes tag]
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20220613232224.2466278-1-swboyd@chromium.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/sx9324.c