]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: wlan-ng: hfa384x_usb: Fix multiple line dereference
authorAlex Briskin <br.shurik@gmail.com>
Fri, 18 Aug 2017 12:27:35 +0000 (15:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Aug 2017 18:10:23 +0000 (11:10 -0700)
Refactor code to be more readable and eliminate the checkpatch
warning

Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/hfa384x_usb.c

index ee5fa86e941d5c3496dd04032c1692ca94dc4efc..d1e8218f96fbbf810e1ad6fa607949a2f5c6a017 100644 (file)
@@ -1344,16 +1344,14 @@ hfa384x_docmd(struct hfa384x *hw,
        if (result != 0) {
                kfree(ctlx);
        } else if (mode == DOWAIT) {
-               struct usbctlx_cmd_completor completor;
+               struct usbctlx_cmd_completor cmd_completor;
+               struct usbctlx_completor *completor;
 
-               result =
-                   hfa384x_usbctlx_complete_sync(hw, ctlx,
-                                                 init_cmd_completor(&completor,
-                                                                    &ctlx->
-                                                                    inbuf.
-                                                                    cmdresp,
-                                                                    &cmd->
-                                                                    result));
+               completor = init_cmd_completor(&cmd_completor,
+                                              &ctlx->inbuf.cmdresp,
+                                              &cmd->result);
+
+               result = hfa384x_usbctlx_complete_sync(hw, ctlx, completor);
        }
 
 done: