[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190717141200.46604-1-yuehaibing@huawei.com>
Date: Wed, 17 Jul 2019 22:12:00 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <andrew@...n.ch>, <vivien.didelot@...il.com>,
<f.fainelli@...il.com>, <davem@...emloft.net>, <olteanv@...il.com>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] net: dsa: sja1105: Add missing spin_unlock
It should call spin_unlock() before return NULL.
Detected by Coccinelle.
Reported-by: Hulk Robot <hulkci@...wei.com>
Fixes: f3097be21bf1 net: ("dsa: sja1105: Add a state machine for RX timestamping")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
net/dsa/tag_sja1105.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c
index 1d96c9d..26363d7 100644
--- a/net/dsa/tag_sja1105.c
+++ b/net/dsa/tag_sja1105.c
@@ -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);
--
2.7.4
Powered by blists - more mailing lists