Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 675be12f authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman
Browse files

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: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f459327
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -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 {
		return -ENODEV;
	}

	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 ret;
	return 0;
}

/*----------------------------------------------------------------