Skip to contentSkip to conversation

staging: rtl8188eu: core: rtw_mlme: Remove return variables.

PATCH New Sanjana Sanikommu 1 participant 1 message Mar 21, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8188eu: core: rtw_mlme: Remove return variables.

The last two lines in the function could
be compressed into one. Avoid usage of local variable. Issue found with Coccinelle using ret.cocci.

---
 drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -2
index 2b5aaa940957..9a4aad5ec365 100644
@@ -1632,8 +1632,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
 	pcmd->rsp = NULL;
 	pcmd->rspsz = 0;
 	INIT_LIST_HEAD(&pcmd->list);
-	res = rtw_enqueue_cmd(pcmdpriv, pcmd);
-	return res;
+	return rtw_enqueue_cmd(pcmdpriv, pcmd);
 
 err_free_parm:
 	kfree(psetkeyparm);
Signature · 1 line
2.17.1