linux/drivers/staging/wfx
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
..
Documentation/devicetree/bindings/net/wireless dt-bindings: staging: wfx: silabs,wfx yaml conversion 2020-10-07 12:55:47 +02:00
bh.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
bh.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
bus_sdio.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
bus_spi.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
bus.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
data_rx.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
data_rx.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
data_tx.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
data_tx.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
debug.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
debug.h staging: wfx: allow to send commands to chip 2019-10-04 10:46:10 +02:00
fwio.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
fwio.h staging: wfx: load firmware 2019-10-04 10:43:39 +02:00
hif_api_cmd.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_api_general.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_api_mib.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_rx.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_rx.h staging: wfx: add support for start-up indication 2019-10-04 10:46:09 +02:00
hif_tx_mib.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_tx_mib.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hif_tx.c staging: wfx: improve error handling of hif_join() 2020-10-10 12:33:58 +02:00
hif_tx.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hwio.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
hwio.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
Kconfig staging: wfx: fix CONFIG_MMC=m with CONFIG_WFX=y 2019-10-26 20:42:32 +02:00
key.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
key.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
main.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
main.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
Makefile staging: wfx: place hif_tx_mib functions into a .c file 2020-04-13 14:32:38 +02:00
queue.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
queue.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
scan.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
scan.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
sta.c staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
sta.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
TODO staging: wfx: update TODO list 2020-09-13 09:23:06 +02:00
traces.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00
wfx.h staging: wfx: update copyrights dates 2020-10-07 12:55:47 +02:00