diff mbox series

net: dsa: sja1105: Release lock in error case

Message ID 20190718022110.GA19222@hari-Inspiron-1545
State Not Applicable
Delegated to: David Miller
Headers show
Series net: dsa: sja1105: Release lock in error case | expand

Commit Message

Hariprasad Kelam July 18, 2019, 2:21 a.m. UTC
This patch adds release of unlock in fail case.

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 net/dsa/tag_sja1105.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Yue Haibing July 18, 2019, 6:53 a.m. UTC | #1
https://patchwork.ozlabs.org/patch/1133135/

This has been fixed.

On 2019/7/18 10:21, Hariprasad Kelam wrote:
> This patch adds release of unlock in fail case.
> 
> Issue identified by coccicheck
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.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);
>
diff mbox series

Patch

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);