aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorAlex Briskin <br.shurik@gmail.com>2017-08-18 15:27:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-20 11:10:23 -0700
commitbf334c024fd215db3395342cac579aa3e9ac46ac (patch)
tree5988c391f342b9d0002984fdad36106434329249 /drivers/staging/wlan-ng
parentStaging: greybus: vibrator.c: Fixed alignment to match open parenthesis. (diff)
downloadlinux-dev-bf334c024fd215db3395342cac579aa3e9ac46ac.tar.xz
linux-dev-bf334c024fd215db3395342cac579aa3e9ac46ac.zip
staging: wlan-ng: hfa384x_usb: Fix multiple line dereference
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>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index ee5fa86e941d..d1e8218f96fb 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -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: