]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: ad7476: remove redundant null check on an array
authorColin Ian King <colin.king@canonical.com>
Fri, 24 Apr 2020 13:04:19 +0000 (14:04 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 May 2020 08:47:21 +0000 (09:47 +0100)
commitd583d4a56f7e1c12ed775b62488861fb3ad9b72d
tree313ce10e0bcdd4024681aae7f9265f6afb417eea
parentbfc08ea7e2995636296b21d55911879d3082bd68
iio: adc: ad7476: remove redundant null check on an array

The null check on st->chip_info->convst_channel is redundant because
convst_channel is a 2 element array of struct iio_chan_spec objects
and this can never be null. Fix this by removing the null check.

Addresses-Coverity: ("Array compared against 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7476.c