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
..
2016-04-02 01:17:36 +02:00
2016-03-18 20:06:46 -07:00
2016-03-17 21:38:27 -07:00
2016-04-07 22:23:47 +02:00
2016-04-07 16:34:26 -07:00
2016-03-21 13:14:16 -07:00
2016-03-25 09:02:13 -07:00
2016-03-29 16:31:16 -07:00
2016-03-24 10:32:42 -07:00
2016-04-08 21:46:05 +02:00
2016-03-21 15:50:28 +01:00
2016-03-23 06:12:39 -07:00
2016-03-17 02:30:16 +01:00
2016-03-24 23:13:48 -07:00
2016-03-21 09:26:45 +01:00
2016-03-16 08:36:55 -07:00
2016-03-25 08:52:25 -07:00
2016-04-07 15:16:40 +03:00
2016-04-08 11:49:47 +02:00
2016-04-07 07:08:46 +10:00
2016-03-22 15:36:02 -07:00
2016-03-17 13:47:50 -07:00
2016-03-27 10:37:48 -07:00
2016-04-09 08:36:44 +02:00
2016-03-20 16:59:27 -04:00
2016-04-07 22:11:08 +02:00
2016-04-17 12:16:36 +01:00
2016-04-07 18:16:20 -07:00
2016-03-25 16:59:11 -07:00
2016-04-07 14:51:47 +02:00
2016-03-23 12:02:29 +01:00
2016-03-27 22:38:12 -04:00
2016-03-23 17:20:59 -07:00
2016-03-18 18:10:38 -07:00
2016-04-08 21:46:05 +02:00
2016-04-09 11:23:27 -07:00
2016-04-05 06:47:50 -07:00
2016-03-24 19:57:15 -07:00
2016-03-25 16:37:42 -07:00
2016-03-18 10:15:11 -07:00
2016-04-04 10:41:08 -07:00
2016-04-10 17:38:55 -07:00
2016-04-04 10:41:08 -07:00
2016-04-08 15:52:45 -04:00
2016-03-19 10:05:34 -07:00
2016-03-26 11:44:33 -04:00
2016-04-09 14:05:45 -07:00
2016-03-22 10:27:29 -06:00
2016-03-19 15:15:07 -07:00
2016-04-04 10:41:08 -07:00
2016-03-16 14:45:55 -07:00
2016-03-22 07:50:11 -05:00
2016-03-29 22:48:53 +02:00
2016-03-21 11:36:17 +00:00
2016-04-01 15:21:27 +02:00
2016-04-02 18:35:05 -05:00
2016-03-25 16:55:37 -07:00
2016-04-05 03:44:48 +02:00
2016-03-15 12:13:56 -07:00
2016-03-23 17:11:48 +01:00
2016-04-02 18:35:05 -05:00
2016-03-18 10:15:11 -07:00
2016-03-28 16:19:00 -07:00
2016-03-24 22:49:08 -07:00
2016-04-01 07:15:54 -05:00
2016-04-09 12:00:42 -07:00
2016-03-20 15:40:32 -07:00
2016-04-04 10:05:49 -07:00
2016-04-09 12:09:37 -07:00
2016-03-30 20:06:44 -07:00
2016-03-18 14:10:57 +08:00
2016-03-31 20:49:39 -07:00
2016-04-09 12:23:02 -07:00
2016-03-17 13:05:09 -07:00
2016-03-22 12:41:14 -07:00
2016-04-04 10:41:08 -07:00
2016-04-07 15:16:39 +03:00
2016-03-22 15:36:02 -07:00
2016-04-04 11:18:00 +01:00