diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-07-01 09:56:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-05 15:26:55 -0400 |
commit | 45a771385ceb644941b195f37ab98f7db39776bd (patch) | |
tree | c3b42f77d0aa67b3b64e6550b09cd2e3b9e8c04b | |
parent | eb8b27ada953f8de182e628d71feff797707768a (diff) |
rtlwifi: rtl8192de: Fix error exit from hw_init
In routine rtl92de_hw_init(), there are two places where a failure is
not handled correctly.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index 5c84131f62e5..5a65bea4cb8f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -932,8 +932,8 @@ int rtl92de_hw_init(struct ieee80211_hw *hw) | |||
932 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 932 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
933 | ("Failed to download FW. Init HW " | 933 | ("Failed to download FW. Init HW " |
934 | "without FW..\n")); | 934 | "without FW..\n")); |
935 | err = 1; | ||
936 | rtlhal->fw_ready = false; | 935 | rtlhal->fw_ready = false; |
936 | return 1; | ||
937 | } else { | 937 | } else { |
938 | rtlhal->fw_ready = true; | 938 | rtlhal->fw_ready = true; |
939 | } | 939 | } |
@@ -1044,6 +1044,11 @@ int rtl92de_hw_init(struct ieee80211_hw *hw) | |||
1044 | if (((tmp_rega & BIT(11)) == BIT(11))) | 1044 | if (((tmp_rega & BIT(11)) == BIT(11))) |
1045 | break; | 1045 | break; |
1046 | } | 1046 | } |
1047 | /* check that loop was successful. If not, exit now */ | ||
1048 | if (i == 10000) { | ||
1049 | rtlpci->init_ready = false; | ||
1050 | return 1; | ||
1051 | } | ||
1047 | } | 1052 | } |
1048 | } | 1053 | } |
1049 | rtlpci->init_ready = true; | 1054 | rtlpci->init_ready = true; |