staging:wlan-ng: clean hfa384x_usbctlx_submit
authorDevendra Naga <devendra.aaru@gmail.com>
Thu, 13 Sep 2012 09:30:54 +0000 (15:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 03:22:24 +0000 (20:22 -0700)
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>
drivers/staging/wlan-ng/hfa384x_usb.c

index bdc63a6..f180c3d 100644 (file)
@@ -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;
 }
 
 /*----------------------------------------------------------------