linux-stable/drivers/staging
Jérôme Pouiller 1cd8909642 staging: wfx: improve error handling of hif_join()
Smatch complains:

   hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315)
   311          if (!hif)
   312                  return -ENOMEM;
   313          body->infrastructure_bss_mode = !conf->ibss_joined;
   314          body->short_preamble = conf->use_short_preamble;
   315          if (channel && channel->flags & IEEE80211_CHAN_NO_IR)
                    ^^^^^^^
   316                  body->probe_for_join = 0;
   317          else
   318                  body->probe_for_join = 1;
   319          body->channel_number = channel->hw_value;
                                       ^^^^^^^^^^^^^^^^^
   320          body->beacon_interval = cpu_to_le32(conf->beacon_int);
   321          body->basic_rate_set =

Indeed, channel can't be NULL (else I would have seen plenty of Ooops
this past year). This patch explicitly claims this restriction.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20201009171307.864608-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10 12:33:58 +02:00
..
android staging: ion: fix spelling mistake in function name "detatch" -> "detach" 2020-08-18 15:56:27 +02:00
axis-fifo
board
clocking-wizard staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
comedi drivers: staging: comedi: fixed duplicate words from checkpatch 2020-08-28 12:19:16 +02:00
emxx_udc staging/emxx_udc: fix indenting issue on a couple of statements 2020-09-22 09:49:32 +02:00
fbtft
fieldbus
fsl-dpaa2 staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c 2020-10-10 12:33:41 +02:00
fwserial staging: fwserial: Remove repeated word and 2020-09-13 09:20:12 +02:00
gasket
gdm724x staging: gdm724x: Use fallthrough pseudo-keyword 2020-07-28 10:18:52 +02:00
goldfish
greybus staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t 2020-10-05 14:23:55 +02:00
gs_fpgaboot staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
hikey9xx staging: hikey9xx: Fix incorrect assignment 2020-09-22 09:51:28 +02:00
iio staging:iio:documentation: Drop most generic docs 2020-09-16 19:12:00 +01:00
kpc2000 staging: kpc2000: kpc_dma: fix spelling mistake "for for" -> "for" 2020-08-28 12:19:15 +02:00
ks7010 staging: ks7010: convert tasklets to use new tasklet_setup() API 2020-09-16 13:12:59 +02:00
media Merge 5.9-rc5 into staging-next 2020-09-14 06:57:52 +02:00
most drivers: most: add character device interface driver 2020-09-07 15:16:26 +02:00
mt7621-dma staging: mt7621-dma: convert tasklets to use new tasklet_setup() API 2020-09-16 13:13:00 +02:00
mt7621-dts
mt7621-pci staging: mt7621-pci: Update driver TODO file 2020-09-13 09:26:18 +02:00
mt7621-pci-phy
mt7621-pinctrl
netlogic staging: netlogic: clear alignment style issues 2020-08-02 12:47:37 +02:00
nvec Staging: nvec: Removes repeated word typo in comment 2020-10-01 10:55:17 +02:00
octeon Staging/IIO driver patches for 5.9-rc1 2020-08-06 14:36:13 -07:00
octeon-usb drivers: staging: octeon-usb: fixed codestyle check warning 2020-09-13 09:21:15 +02:00
olpc_dcon
pi433 staging: pi433: break long lines 2020-09-04 15:39:07 +02:00
qlge staging: qlge: fix build breakage with dumping enabled 2020-10-05 09:57:39 +02:00
ralink-gdma staging: ralink-gdma: convert tasklets to use new tasklet_setup() API 2020-09-16 13:13:00 +02:00
rtl8188eu staging: rtl8188eu: Fix long lines 2020-10-09 15:10:47 +02:00
rtl8192e Revert "staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_WEP" 2020-09-20 16:00:19 +02:00
rtl8192u staging: rtl8192u: clean up comparsions to NULL 2020-09-22 09:51:12 +02:00
rtl8712 staging: rtl8712: Fix enqueue_reorder_recvframe() 2020-10-01 10:55:17 +02:00
rtl8723bs staging: rtl8723bs: replace _cancel_timer with del_timer_sync 2020-10-05 09:59:31 +02:00
rts5208 staging: rts5208: rtsx_transport.c: Fix lines ending with parentheses 2020-09-13 09:20:31 +02:00
sm750fb Staging: sm750fb: Fix basic coding style issues 2020-08-28 12:19:15 +02:00
unisys staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc 2020-07-23 20:34:34 +02:00
vc04_services staging: vchiq: Fix list_for_each exit tests 2020-10-06 18:58:47 +02:00
vme
vt6655 staging: vt6655: Add spaces around arithmetic operators 2020-09-13 09:20:38 +02:00
vt6656
wfx staging: wfx: improve error handling of hif_join() 2020-10-10 12:33:58 +02:00
wlan-ng staging: wlan-ng: convert tasklets to use new tasklet_setup() API 2020-09-16 13:13:00 +02:00
Kconfig staging: spmi: hisi-spmi-controller: add it to the building system 2020-08-18 16:15:23 +02:00
Makefile staging: spmi: hisi-spmi-controller: add it to the building system 2020-08-18 16:15:23 +02:00