diff mbox

[next] rtlwifi: rtl8192de: fix missing curly braces

Message ID 20170110095521.4410-1-vincent.stehle@laposte.net (mailing list archive)
State Superseded
Delegated to: Kalle Valo
Headers show

Commit Message

Vincent Stehlé Jan. 10, 2017, 9:55 a.m. UTC
Restore some curly braces that have been removed in commit c93ac39da006457f
("rtlwifi: Remove some redundant code") while removing redundant messages
and extraneous braces.

This fixes the following smatch warning:

  drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c:326 rtl92d_download_fw() warn: curly braces intended?

...and the following coccinelle warning:

  drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c:325:2-38: code aligned with following code on line 326

Fixes: c93ac39da006457f ("rtlwifi: Remove some redundant code")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Joe Perches <joe@perches.com>
Cc: Ping-Ke Shih <pkshih@realtek.com>
---


Hi,

I saw that in Linux next-20170110.

Best regards,

Vincent.


 drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo Jan. 12, 2017, 3:11 p.m. UTC | #1
Vincent <vincent.stehle@laposte.net> wrote:
> Restore some curly braces that have been removed in commit c93ac39da006457f
> ("rtlwifi: Remove some redundant code") while removing redundant messages
> and extraneous braces.
> 
> This fixes the following smatch warning:
> 
>   drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c:326 rtl92d_download_fw() warn: curly braces intended?
> 
> ...and the following coccinelle warning:
> 
>   drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c:325:2-38: code aligned with following code on line 326
> 
> Fixes: c93ac39da006457f ("rtlwifi: Remove some redundant code")
> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: Joe Perches <joe@perches.com>
> Cc: Ping-Ke Shih <pkshih@realtek.com>

Larry also sent a fix:

rtlwifi: rtl8192de: Remove a pointless goto
https://patchwork.kernel.org/patch/9508121/

Patch set to Superseded.
diff mbox

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
index aa1e51c871df..bcde4da4e593 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
@@ -321,9 +321,10 @@  int rtl92d_download_fw(struct ieee80211_hw *hw)
 	value &= (~BIT(5));
 	rtl_write_byte(rtlpriv, 0x1f, value);
 	spin_unlock_irqrestore(&globalmutex_for_fwdownload, flags);
-	if (err)
+	if (err) {
 		pr_err("fw is not ready to run!\n");
 		goto exit;
+	}
 exit:
 	err = _rtl92d_fw_init(hw);
 	return err;