staging: rtl8821ae: Fix potential infinite loop
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 12 Feb 2014 23:10:28 +0000 (17:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2014 17:18:39 +0000 (09:18 -0800)
Smatch reports the following:
drivers/staging/rtl8821ae/rtl8821ae/hw.c:153 _rtl8821ae_set_fw_clock_on() info: ignoring unreachable code.

Upon investigation, the code in this region has the capability of creating
an infinite loop.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8821ae/rtl8821ae/hw.c

index 5ed7a114c56b1916a0a8fde097a4e1f946008d80..e8344be923444c8808f25ef132c9d0d181679f53 100644 (file)
@@ -147,6 +147,7 @@ static void _rtl8821ae_set_fw_clock_on(struct ieee80211_hw *hw,
                } else {
                        rtlhal->bfw_clk_change_in_progress = false;
                        spin_unlock_bh(&rtlpriv->locks.fw_ps_lock);
+                       break;
                }
        }