]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: Fix a signedness bug in mt7615_add_interface()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 3 May 2019 12:54:36 +0000 (15:54 +0300)
committerFelix Fietkau <nbd@nbd.name>
Tue, 25 Jun 2019 10:55:25 +0000 (12:55 +0200)
commit89947d239815e4e977e64d28864830e090b96313
treecdf474bbcbea306af3768044726e09c68a0e2c5f
parentab073cb8473a54f6d2b3ae622afa02b7ab264ffe
mt76: Fix a signedness bug in mt7615_add_interface()

The problem is that "mvif->omac_idx" is a u8 so it can't be negative
and the error handling won't work.  The get_omac_idx() function returns
-1 on error.

Fixes: 09301c7b1225 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/main.c