OSDN Git Service

mwifiex: usb: unlock on error in mwifiex_usb_tx_aggr_tmo()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 10 Jul 2017 07:21:15 +0000 (10:21 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:50:56 +0000 (17:50 +0300)
We need to unlock if mwifiex_usb_prepare_tx_aggr_skb() fails.

Fixes: a2ca85ad721d ("mwifiex: usb: add timer to flush aggregation packets")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/usb.c

index cb1753e..880ef1c 100644 (file)
@@ -1112,7 +1112,7 @@ static void mwifiex_usb_tx_aggr_tmo(unsigned long context)
        if (err) {
                mwifiex_dbg(adapter, ERROR,
                            "prepare tx aggr skb failed, err=%d\n", err);
-               return;
+               goto unlock;
        }
 
        if (atomic_read(&port->tx_data_urb_pending) >=
@@ -1133,6 +1133,7 @@ static void mwifiex_usb_tx_aggr_tmo(unsigned long context)
 done:
        if (err == -1)
                mwifiex_write_data_complete(adapter, skb_send, 0, -1);
+unlock:
        spin_unlock_irqrestore(&port->tx_aggr_lock, flags);
 }