iio:magnetometer:ak8975: fix uninitialized chipset
authorGregor Boirie <gregor.boirie@parrot.com>
Thu, 3 Mar 2016 10:44:03 +0000 (11:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 5 Mar 2016 15:18:05 +0000 (15:18 +0000)
commit55c0c530f7113d98cb1a0d42f15b8abe5e4b6928
tree929407f9affb5b2b9e4537a0cffe44a98f43e3d8
parentf0fa15cce13d5987c50907eb98846d13e2b4d9ca
iio:magnetometer:ak8975: fix uninitialized chipset

ak_def_array bounds are not properly checked in case of ACPI matching
failure. GCC warns with the following message at line 799:
‘chipset’ may be used uninitialized in this function.

Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/ak8975.c