Received: by 10.223.185.116 with SMTP id b49csp6385781wrg; Wed, 28 Feb 2018 08:33:15 -0800 (PST) X-Google-Smtp-Source: AH8x225TGcap58EAKnZHjX0xNvzA+aRqsNdffIfI9xnQ/YEcSZ5CKrDx7RJjb3kDyTDfc9WAPlaY X-Received: by 10.99.54.196 with SMTP id d187mr14777356pga.154.1519835595521; Wed, 28 Feb 2018 08:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835595; cv=none; d=google.com; s=arc-20160816; b=G61RtLmF7GCvOb9YQGZJk4Zqu568wBAIQRzp7U/SqsH60qeOElNeCfXfduGhgW6FDm B76+sSE32aO3Tn5TwPJdXMxoHZMKpFRcxXX6enpLBQ+JryQ0n/SpBFXYizMrMuYUkvss axGAYK2M3ADMIllU4sJvc6dG9PVs8rmPBzKVElxgSkxhg6i4G0CIdEXqKohhfiZ/AgVL ZUfziYVVZmxmwDfuO4LVHCnWb7VUf5X17Qf8XDXKvjg6a2EK47gLkUsPHuz8z/1WYdBG lR5Vk/VqxjyUiFdDttkFtBiUvdqYPUSJTDJ/uvY97/AeUzSBSE6XTtfUG7se+CWW0AOa unaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=QH2wV6/3ACxr+Vwkg9LEvyRLiILdpCs+iFwn6Kjm7Jw=; b=MZJgEcEQiNnokNMH1Xf07h307twO/2MCxsrt839OKV8hSkVCEQw+WYi+HVJXwIqWBG GbN+xGdaMJTQLZESRZuGbpzQe1+sju0Wm5mTgZFhHQGF+Ay8fJ6E3UkvmIUyHPZ54EaP JcHrTdMjWfulm5Cmbdd7mZDKx0BrtZT+/gapeFpXzOFX6MymLMKyMsars00BLoPaWIXb +DGLbgl6EMncyxSa782iPz02cL87U+qo2BIpUGzrBUgijtp5bedKHCUf844YK8l6Qolh snnKUGDkIKVsbqm62VCoozrV2hV6//0T7sDc5IIT1vTyk9ExeZ1rVHXWyrO8BOLeXKx3 XsgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4si1147332pgc.586.2018.02.28.08.33.00; Wed, 28 Feb 2018 08:33:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934730AbeB1QPA (ORCPT + 99 others); Wed, 28 Feb 2018 11:15:00 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35135 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934719AbeB1QO5 (ORCPT ); Wed, 28 Feb 2018 11:14:57 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yn-0006Xk-Kn; Wed, 28 Feb 2018 15:22:26 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yk-0000Ib-L3; Wed, 28 Feb 2018 15:22:22 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Petri Gynther" , "David S. Miller" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 232/254] net: bcmgenet: fix bcmgenet_open() In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Petri Gynther commit fac25940c5e0d6f31d56bb2a704fadad6d5e382a upstream. If bcmgenet_init_dma() fails, it cleans up after itself. Rx and Tx DMAs are off, and NAPI instances haven't been netif_napi_add()'ed. Therefore, we need to skip calling bcmgenet_fini_dma() on the error handling path. bcmgenet_resume() already does this correctly. Signed-off-by: Petri Gynther Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -2058,7 +2058,7 @@ static int bcmgenet_open(struct net_devi ret = bcmgenet_init_dma(priv); if (ret) { netdev_err(dev, "failed to initialize DMA\n"); - goto err_fini_dma; + goto err_clk_disable; } /* Always enable ring 16 - descriptor ring */