summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-sunfire.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-03 18:01:23 +0100
committerJonathan Cameron <jic23@kernel.org>2017-02-05 10:30:15 +0100
commit17fa2dcbd6325ab877651bef04fca9dd828a2758 (patch)
tree09fee160367c2e4d7784a39381c8a33ab66462f2 /drivers/leds/leds-sunfire.c
parentstaging: bcm2835: cleanup: remove deprecated <asm/uaccess.h> include (diff)
downloadlinux-17fa2dcbd6325ab877651bef04fca9dd828a2758.tar.xz
linux-17fa2dcbd6325ab877651bef04fca9dd828a2758.zip
iio: adc: handle unknow of_device_id data
If we get an unknown 'childmode' value, a number of variables are not initialized properly: drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_probe': drivers/iio/adc/rcar-gyroadc.c:390:5: error: 'num_channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:426:22: error: 'sample_width' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/iio/adc/rcar-gyroadc.c:428:23: error: 'channels' may be used uninitialized in this function [-Werror=maybe-uninitialized] The driver is currently correct, but handling this properly is more robust for possible modifications. There is also a false-positive warning about adcmode being possibly uninitialized, but that cannot happen as we also check the 'first' flag: drivers/iio/adc/rcar-gyroadc.c:398:26: error: 'adcmode' may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for 'adcmode' and bails out for any unknown childmode. Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/leds/leds-sunfire.c')
0 files changed, 0 insertions, 0 deletions