linux-sg2042/drivers/iio/magnetometer
Richard Leitner 05be8d4101 iio: ak8975: fix maybe-uninitialized warning
If i2c_device_id *id is NULL and acpi_match_device returns NULL too,
then chipset may be unitialized when accessing &ak_def_array[chipset] in
ak8975_probe. Therefore initialize chipset to AK_MAX_TYPE, which will
return an error when not changed.

This patch fixes the following maybe-uninitialized warning:

drivers/iio/magnetometer/ak8975.c: In function ‘ak8975_probe’:
drivers/iio/magnetometer/ak8975.c:788:14: warning: ‘chipset’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  data->def = &ak_def_array[chipset];

Signed-off-by: Richard Leitner <dev@g0hl1n.net>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-17 12:16:36 +01:00
..
Kconfig iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
Makefile iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
ak8975.c iio: ak8975: fix maybe-uninitialized warning 2016-04-17 12:16:36 +01:00
bmc150_magn.c iio: Reconcile operation order between iio_register/unregister and pm functions 2015-11-08 15:36:53 +00:00
hid-sensor-magn-3d.c iio: hid-sensor-magn-3d: Constify platform_device_id 2015-05-10 20:31:47 +01:00
hmc5843.h iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
hmc5843_core.c iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
hmc5843_i2c.c iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
hmc5843_spi.c iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
mag3110.c iio: magnetometer: mag3110: Place driver on standby on error 2015-04-01 17:24:09 +02:00
mmc35240.c Second set of new device support, features and cleanup for the 4.3 cycle. 2015-08-12 12:43:41 -07:00
st_magn.h iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE 2016-04-03 10:56:42 +01:00
st_magn_buffer.c iio: st_magn: Add irq trigger handling 2015-07-23 20:43:13 +01:00
st_magn_core.c iio: st_sensors: support active-low interrupts 2016-01-10 12:35:32 +00:00
st_magn_i2c.c iio: st-magn: add support for lsm303agr magnetometer 2015-07-23 20:43:27 +01:00
st_magn_spi.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00