Skip to contentSkip to conversation

staging: wilc1000: Avoid unnecessary braces around if.

PATCH In review Sanjana Sanikommu 2 participants 2 messages Mar 29, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: wilc1000: Avoid unnecessary braces around if.

Remove unnecessary brace around if statement.
Issue found using checkpatch.pl

WARNING: braces {} are not necessary for single statement blocks

---
Changes in v2:
Change the word in subject line from "else" to "if" statement. Change the word in log message from "else" to "if" statement.

 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -2
index a10c31bce07f..150ba033198f 100644
@@ -1399,9 +1399,8 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,
 	if (ies) {
 		conn_info->req_ies_len = ies_len;
 		conn_info->req_ies = kmemdup(ies, ies_len, GFP_KERNEL);
-		if (!conn_info->req_ies) {
+		if (!conn_info->req_ies)
 			return -ENOMEM;
-		}
 	}
 
 	result = wilc_send_connect_wid(vif);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 10 lines · Sanjana Sanikommu

Remove unnecessary brace around if statement.
Issue found using checkpatch.pl

WARNING: braces {} are not necessary for single statement blocks

---
Changes in v2:
Change the word in subject line from "else" to "if" statement. Change the word in log message from "else" to "if" statement.

Patch does not apply to my tree :(

Please rebase and resend.

thanks,

greg k-h