提交 45a77138 编写于 作者: L Larry Finger 提交者: John W. Linville

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 eb8b27ad
...@@ -932,8 +932,8 @@ int rtl92de_hw_init(struct ieee80211_hw *hw) ...@@ -932,8 +932,8 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
("Failed to download FW. Init HW " ("Failed to download FW. Init HW "
"without FW..\n")); "without FW..\n"));
err = 1;
rtlhal->fw_ready = false; rtlhal->fw_ready = false;
return 1;
} else { } else {
rtlhal->fw_ready = true; rtlhal->fw_ready = true;
} }
...@@ -1044,6 +1044,11 @@ int rtl92de_hw_init(struct ieee80211_hw *hw) ...@@ -1044,6 +1044,11 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
if (((tmp_rega & BIT(11)) == BIT(11))) if (((tmp_rega & BIT(11)) == BIT(11)))
break; break;
} }
/* check that loop was successful. If not, exit now */
if (i == 10000) {
rtlpci->init_ready = false;
return 1;
}
} }
} }
rtlpci->init_ready = true; rtlpci->init_ready = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册