]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7615: Fix a dereference of pointer sta before it is null checked
authorColin Ian King <colin.king@canonical.com>
Mon, 19 Apr 2021 13:20:32 +0000 (14:20 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 21 Apr 2021 18:55:54 +0000 (20:55 +0200)
commit4b63098f5cea45cc1e7ecbd9dab64bb136a1af85
treee896a7be7a60b2e4387e77c53d00eb352157b78a
parentcd428a4d2425377d5a2dcb02221f15057bc2cfd5
mt76: mt7615: Fix a dereference of pointer sta before it is null checked

Currently the assignment of idx dereferences pointer sta before
sta is null checked, leading to a potential null pointer dereference.
Fix this by assigning idx when it is required after the null check on
pointer sta.

Addresses-Coverity: ("Dereference before null check")
Fixes: c9b13f97536c ("mt76: mt7615: fix TSF configuration")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c