Skip to contentSkip to conversation

staging:wlan-ng Correct multiple line dereference

PATCH In review janani-sankarababu 2 participants 2 messages Jul 28, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging:wlan-ng Correct multiple line dereference

This patch fixes the multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable.

---
 drivers/staging/wlan-ng/hfa384x_usb.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +5 -8
index ee5fa86..2fc5f3e 100644
@@ -1345,15 +1345,13 @@ static int hfa384x_usbctlx_complete_sync(struct hfa384x *hw,
 		kfree(ctlx);
 	} else if (mode == DOWAIT) {
 		struct usbctlx_cmd_completor completor;
+		struct usbctlx_completor *cmplt;
+
+		cmplt = init_cmd_completor(&completor, &ctlx->inbuf.cmdresp,
+					   &cmd->result);
 
-		result =
-		    hfa384x_usbctlx_complete_sync(hw, ctlx,
-						  init_cmd_completor(&completor,
-								     &ctlx->
-								     inbuf.
-								     cmdresp,
-								     &cmd->
-								     result));
+		result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt);
 	}
 

done:
--
1.9.1

#1 lore raw
Quoted 1 line

From header. Subject. Doesn't apply (read

Documentation/process/email-clients.rst).

Quoted 6 lines · janani-sankarababu

This patch fixes the multiple line dereference Warning reported by checkpath script. This has been made to simplify the code and make it more readable.

---

Put a changelog under the --- cut off:
v3: patch format issues

regards,
dan carpenter