net: dsa: sja1105: Fix missing unlock on error in sk_buff()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 17 Jul 2019 06:29:56 +0000 (06:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Jul 2019 23:32:39 +0000 (16:32 -0700)
Add the missing unlock before return from function sk_buff()
in the error handling case.

Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_sja1105.c

index 1d96c9d4a8e99c6b14dcb170844d7397efdfd25f..26363d72d25b35377bf844466b10e2844cbb70f6 100644 (file)
@@ -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);