Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1647134ybi; Wed, 17 Jul 2019 19:23:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx5hOqHxHCpmFf89KmGjJepFVq8UGCY0rV8xMgOogPhHjw6tkaG78fttWU8fHCPglauSJB X-Received: by 2002:a65:6904:: with SMTP id s4mr40453849pgq.33.1563416629711; Wed, 17 Jul 2019 19:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563416629; cv=none; d=google.com; s=arc-20160816; b=Hs3Hgr1GQt8UmZ7mPurbe+lImzFDL2nLR8uHpLFTXWPGT3or84keuNivIzWmPxqU/7 5QbTzXNflQChYeubnajmUGig6lQKgq6K9rBJg+yEp66gyg+zkgg687Vyni8ER7vGqrGa OK+FaGN2Uq4hGm0mOqz58CA95jItIUxxQlhfZKfZrfMQXnGjS4ZhP63UM6cKwmmHY+iB f8eGj0QtIT551Fu1ABHmxLqPcMQrio/DgQ7AoBkZXmufyHdykws031q3MA762fzugP7v uhVrVa2Ss9bKjHmFoJwWK+5ocPKGtPcsHBX08+Na5QRprRKo9zXaDSL6QxqeslxrpU9E 56Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=p+LjhuKBh7nce7Y+lpAKDWjlvBnJG3DCGoCsO8czRPA=; b=xGZzYgzlqsh46pBHPsAurSPmQfNcZIG6PImpECWm7PjqKAx9GdNNNoRnYwGc2y048r ochMIfmEr4izkBTOCJ8wg6GMz0dVt+05frwQDNB5jRONhkSCv5udPY/9cfE6cNhKAPzG SaDDFH5Ya39/WIyj64g9JF23Eh9KxfGoi1lQyKIlXiRXMEtJ1IEgU4poTrKm2Xm/GnbO AJsXOOS/2dro161gDVBB1UyJiNnTlU2znplOWolP9PVNF80YyKzs91Ad+Pj9bfH0WWHl 02CUMDiSu+x9qT9uZkDwBMpcCpPNT4zYugWjb2wmySxxu35CUpPo/fwcuELO92dov/xH SFSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V9oXHnjN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i23si1590448pfa.196.2019.07.17.19.23.33; Wed, 17 Jul 2019 19:23:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V9oXHnjN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733059AbfGRCVS (ORCPT + 99 others); Wed, 17 Jul 2019 22:21:18 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40590 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727653AbfGRCVR (ORCPT ); Wed, 17 Jul 2019 22:21:17 -0400 Received: by mail-pl1-f195.google.com with SMTP id a93so12988539pla.7; Wed, 17 Jul 2019 19:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=p+LjhuKBh7nce7Y+lpAKDWjlvBnJG3DCGoCsO8czRPA=; b=V9oXHnjNRMBPoc/XZ7mKAQDwsYqQUg+QzF44fwuMzKNaE/56hg24mSLhmd664iXS9I neugAspe7T7CagYX5h6Ixx3fe1uNSe3YrHuB0qX3WFpMsFA2UISxh6CAP9x8dvMXDojZ t0oSgQByNbYb75yFM3KQX8k14t4whJDqU345lKoxnTVLWFOWBjKkCGSndn0xClnFq6aL jitefDyI/BkvVvS/W/2S1BJI/JIvov1c+1HpIIx0wwlqqe1HkREbWDVBmlCFswOqhAG4 bsSAYAit3ogE8QbRKSx1J9K+jIC7elr4KpX9LEw7nWrd1WHl1FmuXAGyBj2YH+WUvKD/ aQfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=p+LjhuKBh7nce7Y+lpAKDWjlvBnJG3DCGoCsO8czRPA=; b=UzXmQJxIlroKhhHlznebwDWbPR1HdowpNL59hilcXcF8DUJqysDo4A6iuNyXkolwiL zL6R1IjDqDyz6JTp+CaDyYaLxOR5tyaTXaQzz2eNMI1sFtE4N7VbjR2CdjlfRFvcFAYf +KuMkX/rRgNEVNuxZaGOaZajx0wzmmNm0UUlZgvk1z6eVJYBW+mYBs4C+Neia6lehb9R ow6Vkcjqkj+k8T3u0oN1W2eJu43b5i1webd992efWl2EIu3O09ANouRRpaP/qtqwQW7+ Xru8EzK5Z00DDkjrPdng2H2D8OsQ88tfw+cDQxQZ1/ETdPPSdo8jnWS0cB9SQThRqQoz Z6Sw== X-Gm-Message-State: APjAAAXagb5GxGU33KsVUxz34K88wVFXTtdH/BTxPS7pw7R3TLmTRDJ2 UjyOfN6e4XWdb1xnFw/nV+8= X-Received: by 2002:a17:902:59c3:: with SMTP id d3mr45913396plj.22.1563416476874; Wed, 17 Jul 2019 19:21:16 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.86.126]) by smtp.gmail.com with ESMTPSA id q69sm39143218pjb.0.2019.07.17.19.21.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 19:21:16 -0700 (PDT) Date: Thu, 18 Jul 2019 07:51:10 +0530 From: Hariprasad Kelam To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: dsa: sja1105: Release lock in error case Message-ID: <20190718022110.GA19222@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds release of unlock in fail case. Issue identified by coccicheck Signed-off-by: Hariprasad Kelam --- 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