linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] mt76: mt7615: fix TSF configuration
@ 2021-04-21 13:17 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-04-21 13:17 UTC (permalink / raw)
  To: ryder.lee; +Cc: linux-wireless, linux-mediatek

Hello Ryder Lee,

This is a semi-automatic email about new static checker warnings.

The patch a4a5a430b076: "mt76: mt7615: fix TSF configuration" from 
Feb 23, 2021, leads to the following Smatch complaint:

    drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:74 mt7663_usb_sdio_set_rates()
    warn: variable dereferenced before check 'sta' (see line 70)

drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c
    69		u32 w5, w27, addr, val;
    70		u16 idx = sta->vif->mt76.omac_idx;
                          ^^^^^^^^^^^^^^
The patch adds a new dereference

    71	
    72		lockdep_assert_held(&dev->mt76.mutex);
    73	
    74		if (!sta)
                     ^^^
The old code checks for NULL

    75			return -EINVAL;
    76	

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-21 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-21 13:17 [bug report] mt76: mt7615: fix TSF configuration Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).