Skip to contentSkip to conversation

bnx2x: unlock before returning an error

PATCH Applied Dan Carpenter 3 participants 3 messages Jan 25, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: unlock before returning an error

We introduced a new return here but forgot to drop the lock.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +1 -0
index cb6339c..69465c3 100644
@@ -1836,6 +1836,7 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
 			rc = exeq->remove(bp, exeq->owner, exeq_pos);
 			if (rc) {
 				BNX2X_ERR("Failed to remove command\n");
+				spin_unlock_bh(&exeq->lock);
 				return rc;
 			}
 			list_del(&exeq_pos->link);
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dan Carpenter

We introduced a new return here but forgot to drop the lock.

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +0 -0
index cb6339c..69465c3 100644

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,

Quoted 8 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +1 -1
@@ -1836,6 +1836,7 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
 			rc = exeq->remove(bp, exeq->owner, exeq_pos);
 			if (rc) {
 				BNX2X_ERR("Failed to remove command\n");
+				spin_unlock_bh(&exeq->lock);
 				return rc;
 			}
 			list_del(&exeq_pos->link);
--

Thank you, Dan.