Arnd Bergmann
9a35bc2ae5
hostap: avoid uninitialized variable use in hfa384x_get_rid
...
commit 48dc5fb3ba upstream.
The driver reads a value from hfa384x_from_bap(), which may fail,
and then assigns the value to a local variable. gcc detects that
in in the failure case, the 'rlen' variable now contains
uninitialized data:
In file included from ../drivers/net/wireless/intersil/hostap/hostap_pci.c:220:0:
drivers/net/wireless/intersil/hostap/hostap_hw.c: In function 'hfa384x_get_rid':
drivers/net/wireless/intersil/hostap/hostap_hw.c:842:5: warning: 'rec' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (le16_to_cpu(rec.len) == 0) {
This restructures the function as suggested by Russell King, to
make it more readable and get more reliable error handling, by
handling each failure mode using a goto.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-04-30 05:49:28 +02:00
..
2017-04-27 09:09:33 +02:00
2016-11-10 16:36:33 +01:00
2017-02-09 08:02:45 +01:00
2015-10-12 19:56:27 -07:00
2017-02-09 08:02:47 +01:00
2017-03-12 06:37:30 +01:00
2017-04-21 09:30:06 +02:00
2017-03-15 09:57:11 +08:00
2017-01-19 20:17:22 +01:00
2017-04-21 09:30:07 +02:00
2017-01-12 11:22:49 +01:00
2017-01-26 08:23:48 +01:00
2016-01-04 21:46:45 -05:00
2017-03-30 09:35:18 +02:00
2016-10-16 17:36:15 +02:00
2017-04-18 07:14:36 +02:00
2017-03-12 06:37:30 +01:00
2015-10-30 01:16:16 -04:00
2016-09-07 08:32:41 +02:00
2016-05-04 14:48:54 -07:00
2016-11-10 16:36:35 +01:00
2016-05-04 14:48:49 -07:00
2015-11-24 15:25:46 -08:00
2016-10-28 03:01:25 -04:00
2017-04-21 09:30:04 +02:00
2017-02-09 08:02:46 +01:00
2015-10-30 16:10:40 +01:00
2017-04-27 09:09:34 +02:00
2017-01-12 11:22:48 +01:00
2016-02-25 12:01:23 -08:00
2016-08-10 11:49:30 +02:00
2017-01-19 20:17:20 +01:00
2015-11-06 17:50:42 -08:00
2016-09-15 08:27:46 +02:00
2017-04-12 12:38:33 +02:00
2017-03-15 09:57:13 +08:00
2017-04-27 09:09:32 +02:00
2017-03-30 09:35:18 +02:00
2017-04-21 09:30:06 +02:00
2017-03-26 12:13:19 +02:00
2015-11-05 13:15:12 -08:00
2016-09-24 10:07:35 +02:00
2015-10-15 20:31:59 +11:00
2015-11-04 14:03:04 +05:30
2016-06-01 12:15:53 -07:00
2017-04-08 09:53:32 +02:00
2017-04-21 09:30:07 +02:00
2016-07-27 09:47:35 -07:00
2016-10-28 03:01:35 -04:00
2015-11-12 07:06:18 -05:00
2016-11-26 09:54:53 +01:00
2017-01-12 11:22:47 +01:00
2017-04-27 09:09:33 +02:00
2017-04-27 09:09:33 +02:00
2017-04-30 05:49:28 +02:00
2016-11-18 10:48:36 +01:00
2017-02-23 17:43:10 +01:00
2017-04-21 09:30:06 +02:00
2016-09-15 08:27:51 +02:00
2016-05-11 11:21:21 +02:00
2016-11-15 07:46:39 +01:00
2015-12-12 16:07:25 +01:00
2017-03-30 09:35:17 +02:00
2017-03-30 09:35:20 +02:00
2016-04-20 15:42:09 +09:00
2016-10-07 15:23:41 +02:00
2016-03-03 15:07:28 -08:00
2017-03-31 09:49:53 +02:00
2017-04-21 09:30:07 +02:00
2016-08-16 09:30:48 +02:00
2017-04-08 09:53:32 +02:00
2015-12-12 02:31:11 +01:00
2016-08-10 11:49:25 +02:00
2017-03-15 09:57:14 +08:00
2017-03-12 06:37:25 +01:00
2016-08-20 18:09:20 +02:00
2017-04-21 09:30:07 +02:00
2017-03-30 09:35:20 +02:00
2017-04-21 09:30:05 +02:00
2016-03-09 15:34:49 -08:00
2016-09-24 10:07:42 +02:00
2017-01-15 13:41:36 +01:00
2015-11-04 22:15:15 -08:00
2017-01-09 08:07:42 +01:00
2017-04-12 12:38:33 +02:00
2017-04-21 09:30:05 +02:00
2017-01-09 08:07:44 +01:00
2016-06-01 12:15:53 -07:00
2017-04-30 05:49:27 +02:00
2016-10-31 04:13:59 -06:00
2017-04-18 07:14:37 +02:00
2017-03-30 09:35:17 +02:00
2017-03-30 09:35:20 +02:00
2016-09-15 08:27:53 +02:00
2017-04-21 09:30:06 +02:00
2017-03-31 09:49:53 +02:00
2017-01-19 20:17:21 +01:00
2017-03-12 06:37:29 +01:00
2016-04-12 09:08:54 -07:00
2017-03-30 09:35:18 +02:00
2015-11-04 22:15:15 -08:00
2015-11-16 15:22:28 -07:00