Skip to contentSkip to conversation

net: dsa: sja1105: Release lock in error case

PATCH In review Hariprasad Kelam 2 participants 2 messages Jul 18, 2019

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

PATCH 1/1 net: dsa: sja1105: Release lock in error case

This patch adds release of unlock in fail case.

Issue identified by coccicheck

---
 net/dsa/tag_sja1105.c | 1 +
 1 file changed, 1 insertion(+)
net/dsa/tag_sja1105.c +1 -0
index 1d96c9d..26363d7 100644
@@ -216,6 +216,7 @@ static struct sk_buff
 		if (!skb) {
 			dev_err_ratelimited(dp->ds->dev,
 					    "Failed to copy stampable skb\n");
+			spin_unlock(&sp->data->meta_lock);
 			return NULL;
 		}
 		sja1105_transfer_meta(skb, meta);
Signature · 1 line
2.7.4
#1 lore raw

https://patchwork.ozlabs.org/patch/1133135/

This has been fixed.

Quoted 22 lines · Hariprasad Kelam

This patch adds release of unlock in fail case.

Issue identified by coccicheck

---
 net/dsa/tag_sja1105.c | 1 +
 1 file changed, 1 insertion(+)
net/dsa/tag_sja1105.c +1 -0
index 1d96c9d..26363d7 100644
@@ -216,6 +216,7 @@ static struct sk_buff
 		if (!skb) {
 			dev_err_ratelimited(dp->ds->dev,
 					    "Failed to copy stampable skb\n");
+			spin_unlock(&sp->data->meta_lock);
 			return NULL;
 		}
 		sja1105_transfer_meta(skb, meta);