rtlwifi: rtl8723ae: Fix missing break in switch statement
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 16 Apr 2019 15:17:22 +0000 (10:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:43:44 +0000 (19:43 +0200)
commit 84242b82d81c54e009a2aaa74d3d9eff70babf56 upstream.

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")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c

index f8be0bd7e3269c128f226a53fdc4535256faf85e..0741280b65a4ddc33e384c289b6a41baef922f46 100644 (file)
@@ -1703,6 +1703,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;