From: Olivier Langlois Date: Sat, 1 Feb 2014 06:11:10 +0000 (-0500) Subject: rtlwifi: Fix incorrect return from rtl_ps_enable_nic() X-Git-Tag: v3.14-rc4~30^2~5^2^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e8c5e56b307271c2dab6f8bfd1d8a3822ca2390;p=platform%2Fkernel%2Flinux-exynos.git rtlwifi: Fix incorrect return from rtl_ps_enable_nic() rtl_ps_enable_nic() is called from loops that will loop until this function returns true or a maximum number of retries is performed. hw_init() returns non-zero on error. In that situation return false to restore the original design intent to retry hw init when it fails. Signed-off-by: Olivier Langlois Cc: Stable Acked-by: Larry Finger Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c index deedae3..d1c0191 100644 --- a/drivers/net/wireless/rtlwifi/ps.c +++ b/drivers/net/wireless/rtlwifi/ps.c @@ -48,7 +48,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw) /*<2> Enable Adapter */ if (rtlpriv->cfg->ops->hw_init(hw)) - return 1; + return false; RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); /*<3> Enable Interrupt */