]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1838576
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c

index c3f98d58124cd66860dd16babbc7d24bd9b2d257..f766ed0378079d9183b71a9e99ad2c3bcf1740c0 100644 (file)
@@ -1700,6 +1700,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;