All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] mt76: mt7615: fix TSF configuration
@ 2021-04-21 13:17 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages 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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [bug report] mt76: mt7615: fix TSF configuration
@ 2021-04-21 13:17 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages 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] 2+ messages in thread

end of thread, other threads:[~2021-04-21 13:19 UTC | newest]

Thread overview: 2+ messages (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
2021-04-21 13:17 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.