* [PATCH] mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key
@ 2019-06-04 22:12 Lorenzo Bianconi
2019-06-07 17:02 ` Felix Fietkau
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2019-06-04 22:12 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, ryder.lee, royluo
Do not check key pointer in mt7615_mcu_set_wtbl_key since if set_key_cmd
is SET_KEY, key will be always not NULL. This patch will address a false
positive reported by Coverity-Scan
Addresses-Coverity-ID: 1445463 ("Dereference after null check")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
This patch is based on 'mt76: mt7615: fix slow performance when enable
encryption'
https://patchwork.kernel.org/patch/10972385/
---
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index d104435cd901..7a41c37e7460 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -879,7 +879,7 @@ int mt7615_mcu_set_wtbl_key(struct mt7615_dev *dev, int wcid,
u8 cipher;
cipher = mt7615_get_key_info(key, req.key.key_material);
- if (cipher == MT_CIPHER_NONE && key)
+ if (cipher == MT_CIPHER_NONE)
return -EOPNOTSUPP;
req.key.rkv = 1;
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key
2019-06-04 22:12 [PATCH] mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key Lorenzo Bianconi
@ 2019-06-07 17:02 ` Felix Fietkau
0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2019-06-07 17:02 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: lorenzo.bianconi, linux-wireless, ryder.lee, royluo
On 2019-06-05 00:12, Lorenzo Bianconi wrote:
> Do not check key pointer in mt7615_mcu_set_wtbl_key since if set_key_cmd
> is SET_KEY, key will be always not NULL. This patch will address a false
> positive reported by Coverity-Scan
>
> Addresses-Coverity-ID: 1445463 ("Dereference after null check")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Applied, thanks.
- Felix
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-07 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-04 22:12 [PATCH] mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key Lorenzo Bianconi
2019-06-07 17:02 ` Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox