android_kernel_lge_bullhead/drivers/net/wireless/hostap
Arnd Bergmann f6d81f27fc hostap: avoid uninitialized variable use in hfa384x_get_rid
commit 48dc5fb3ba53b20418de8514700f63d88c5de3a3 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: Willy Tarreau <w@1wt.eu>
2017-06-20 14:04:50 +02:00
..
Kconfig
Makefile
hostap.h
hostap_80211.h
hostap_80211_rx.c wireless: drivers: make use of WLAN_EID_VENDOR_SPECIFIC 2012-10-18 09:01:54 +02:00
hostap_80211_tx.c drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:08 -04:00
hostap_ap.c wireless: single_open() leaks 2013-05-05 00:13:20 -04:00
hostap_ap.h
hostap_common.h
hostap_config.h
hostap_cs.c drivers/net: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:27:33 -07:00
hostap_download.c hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00
hostap_hw.c hostap: avoid uninitialized variable use in hfa384x_get_rid 2017-06-20 14:04:50 +02:00
hostap_info.c drivers/net: use is_zero_ether_addr() instead of memcmp() 2012-09-07 15:03:38 -04:00
hostap_ioctl.c Hostap: copying wrong data prism2_ioctl_giwaplist() 2013-08-29 09:47:38 -07:00
hostap_main.c drivers/net: use is_zero_ether_addr() instead of memcmp() 2012-09-07 15:03:38 -04:00
hostap_pci.c net/wireless: use module_pci_driver 2012-04-16 14:38:50 -04:00
hostap_plx.c net/wireless: use module_pci_driver 2012-04-16 14:38:50 -04:00
hostap_proc.c wireless: single_open() leaks 2013-05-05 00:13:20 -04:00
hostap_wlan.h hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00