Skip to contentSkip to conversation

rtlwifi: rtl8723ae: Fix missing break in switch statement

PATCH In review Gustavo A. R. Silva 2 participants 5 messages Apr 16, 2019 – Apr 25, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 rtlwifi: rtl8723ae: Fix missing break in switch statement

Add missing break statement in order to prevent the code from falling through to case 0x1025, and erroneously setting rtlhal->oem_id to RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and none of the cases in switch (rtlefuse->eeprom_smid) match.

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine")

---
Changes in v2:
- Update tag from wireless-drivers to wireless-drivers-next

 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c +1 -0
index 6bab162e1bb8..655460f61bbc 100644
@@ -1675,6 +1675,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
 					rtlhal->oem_id = RT_CID_819X_LENOVO;
 					break;
 				}
+				break;
 			case 0x1025:
 				rtlhal->oem_id = RT_CID_819X_ACER;
 				break;
Signature · 1 line
2.21.0
#1 lore raw

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

Quoted 31 lines · Gustavo A. R. Silva

Add missing break statement in order to prevent the code from falling through to case 0x1025, and erroneously setting rtlhal->oem_id to RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and none of the cases in switch (rtlefuse->eeprom_smid) match.

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine")

---
Changes in v2:
- Update tag from wireless-drivers to wireless-drivers-next

 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c +1 -0
index 6bab162e1bb8..655460f61bbc 100644
@@ -1675,6 +1675,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
 					rtlhal->oem_id = RT_CID_819X_LENOVO;
 					break;
 				}
+				break;
 			case 0x1025:
 				rtlhal->oem_id = RT_CID_819X_ACER;
 				break;
#2 lore raw
Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

It's in my queue.

Signature · 1 line
Kalle Valo
#3 lore raw
Quoted 10 lines · Kalle Valo
Quoted 5 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

It's in my queue.

Awesome. :)

Thank you
--
Gustavo

#4 lore raw
In reply to Gustavo A. R. Silva
Quoted 11 lines · Gustavo A. R. Silva

Add missing break statement in order to prevent the code from falling through to case 0x1025, and erroneously setting rtlhal->oem_id to RT_CID_819X_ACER when rtlefuse->eeprom_svid is equal to 0x10EC and none of the cases in switch (rtlefuse->eeprom_smid) match.

This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes 238ad2ddf34b ("rtlwifi: rtl8723ae: Clean up the hardware info routine")

Patch applied to wireless-drivers-next.git, thanks.

84242b82d81c rtlwifi: rtl8723ae: Fix missing break in switch statement

Signature · 3 lines
https://patchwork.kernel.org/patch/10903325/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches