diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-09-13 13:30:54 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 07:22:24 +0400 |
commit | 675be12f45f3f90ed22949fe08ad164316f75316 (patch) | |
tree | 2bb1fe9a6b2f70c0feb9940e4d0a30a2af828600 /drivers/staging/wlan-ng | |
parent | 3f45932720b7d4e1d409b3cc5cbc0bf18d67553b (diff) | |
download | linux-675be12f45f3f90ed22949fe08ad164316f75316.tar.xz |
staging:wlan-ng: clean hfa384x_usbctlx_submit
else is not required as such we can do with just with a single if
Signed-off-by: Devendra Naga <devendra.aaru@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.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index bdc63a61c663..f180c3d8b012 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -4045,23 +4045,20 @@ static void hfa384x_usb_throttlefn(unsigned long data) static int hfa384x_usbctlx_submit(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx) { unsigned long flags; - int ret; spin_lock_irqsave(&hw->ctlxq.lock, flags); if (hw->wlandev->hwremoved) { spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - ret = -ENODEV; - } else { - ctlx->state = CTLX_PENDING; - list_add_tail(&ctlx->list, &hw->ctlxq.pending); - - spin_unlock_irqrestore(&hw->ctlxq.lock, flags); - hfa384x_usbctlxq_run(hw); - ret = 0; + return -ENODEV; } - return ret; + ctlx->state = CTLX_PENDING; + list_add_tail(&ctlx->list, &hw->ctlxq.pending); + spin_unlock_irqrestore(&hw->ctlxq.lock, flags); + hfa384x_usbctlxq_run(hw); + + return 0; } /*---------------------------------------------------------------- |