OSDN Git Service

fore200e: fix missing unlock on error in bsq_audit()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 15 Oct 2018 03:07:16 +0000 (03:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 05:48:35 +0000 (22:48 -0700)
Add the missing unlock before return from function bsq_audit()
in the error handling case.

Fixes: 1d9d8be91788 ("fore200e: check for dma mapping failures")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/fore200e.c

index 40d6ddb..f55ffde 100644 (file)
@@ -1606,6 +1606,7 @@ fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb)
     if (dma_mapping_error(fore200e->dev, tpd->tsd[0].buffer)) {
        if (tx_copy)
            kfree(data);
+       spin_unlock_irqrestore(&fore200e->q_lock, flags);
        return -ENOMEM;
     }
     tpd->tsd[ 0 ].length = tx_len;