From patchwork Tue May 28 12:33:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 165305 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp8422880ili; Tue, 28 May 2019 05:33:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTlcPHk18BGW3wjYaDopMjLI/V56MYSUOaT00tJybCSWWreiocmQB+EU5F19NhIYpCC1nG X-Received: by 2002:a63:1650:: with SMTP id 16mr39038194pgw.164.1559046838881; Tue, 28 May 2019 05:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559046838; cv=none; d=google.com; s=arc-20160816; b=MQVtCjuKJ2qmkMeJUCUk1lIDfDmHLizhVq4oz6HxrHeIGfPH1l6OwQ5vb2pCh0yjY4 Vau3Cwb1qEmPG0EvBzX7KwQzps7IJ3gXkRl/oSA/xdAuyqEOq1rqQdbxTux3h/N8Nbcf sxWHUaMhzZb17zz+zCZyz4Jom3AaRTrZp476zBw5Bq6RxAh9QKf7MWsi1MPV8AHgK5jB zGJOs5NF4OHFYr7/McH41TSK4wsnYM4c76Ta8L7tSwAmQOCzMydlBCZIsfRMm/9TTBUJ 00cCn8VYz/duui9UVF2LcpU1RVUyBmt4R42gx0pHc5HiOpV/jC/cfQtlX3wjH3gvzeaU JnNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=p6KdJeiH86xgZo1O+1oE/uG9And6c5wGK5T3gqfY/Xo=; b=Zy9jBJkA7JZ4e3Pzvf7hawbCOZEEPwS+A1htSwt1nW/hFruzkZgmA39OrSqhR5bYJ+ XNJKjkKShVRB73SIjIk4Ioe4bLiA6KRGhnG2BaQBrT7uxDZZfYjxkpX+IrBRj1hSWDsf zXd/1zMoIZhWm1JJwtK4HVtauD97rHWd+oBVf1RNh5PUxenUyYwtMwIQ81pF6VJcpavY 4bs+pXAqPKLBwkfF/ettfC3oQJjWEO00CMhDh913wI4Exlgs8WX1I5uo9b/ovn5EiAJ8 x/lDxd6XJxo5Iumba88CFjA9avTBBZxykwwaYJ/0tk0a8hNpGYQvm51MIEBtDxdX5KPl x2vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bzdfa6+S; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si21117188pli.403.2019.05.28.05.33.58; Tue, 28 May 2019 05:33:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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=@linaro.org header.s=google header.b=Bzdfa6+S; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727222AbfE1Md6 (ORCPT + 5 others); Tue, 28 May 2019 08:33:58 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46620 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726787AbfE1Md5 (ORCPT ); Tue, 28 May 2019 08:33:57 -0400 Received: by mail-lj1-f196.google.com with SMTP id m15so2697962ljg.13 for ; Tue, 28 May 2019 05:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=p6KdJeiH86xgZo1O+1oE/uG9And6c5wGK5T3gqfY/Xo=; b=Bzdfa6+SY9BtK9NQo8gyteSgCIx5YWOdqoxK2BqFQ36uCyO8H8Afo1OyBE3Asf6tR1 ECLkWPcB+CABwlIM3oYkUYAK2AXvqNg4ZByJroQbuW6Je5hSqjFQNFLPg4afIVlSF2Lh 2YWcPYfVMLFPYI3fBZ6WurO7Ua4cCfuy7BBxdj6w9meNfhIrueMfnPx/LU9ORY9hICR/ DQ1oiufcthmcCqA1PZAIf0EFNlwH/7/TGJ+JK7LciN844pvc6dTKPKarjiR046byN8N8 nMsX8SBKdOWAckmbMmfBBQd81xA3hyvnPru7j5IJu+2DLxrhK0VUosmjdEGO+kgOOOOq Gu2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=p6KdJeiH86xgZo1O+1oE/uG9And6c5wGK5T3gqfY/Xo=; b=VnEWvQIYkZSwbAoa+8wlv2dD8y2Ua4PdWgILlNhqUpaZYjU0UnlMFq6/IQqRkifa7G h3l3lRyjOExMGra5pw8KLXmkmAjBN5tGuwi3Oosc1uHk6Yae4/vaIR412ZABpGO+8fvx GoGjYKMSi7id1wL/wa9kSSCQqR7kOGp77z15bjVb0ntPTuW01DUqI2Jr7L6B1uuqhKa8 RSxyMTIv3y9N9VsKj5BjHyVw58n8K8QpdLsCEcDRkLSfuYl4Na3U/0OC6pWXGx4zZeTH nudYAGR1EjJdNi6UFldH2/mnpJVh02GYQbfib3GcvU1sQJR34t9AZqguHfywi6X0PUUU yKCw== X-Gm-Message-State: APjAAAWVYCqRo54Bz6hbN4fYWE7wxVcnT8NO1oMaI9BNxsMiUdknAFTO j9QlL7kzS/I2O3tNNF1oLyrIovI2ZBI= X-Received: by 2002:a2e:6c0b:: with SMTP id h11mr29242008ljc.15.1559046835818; Tue, 28 May 2019 05:33:55 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id y14sm2905662ljh.60.2019.05.28.05.33.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 05:33:55 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com Cc: davem@davemloft.net, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] net: ethernet: ti: cpsw: correct .ndo_open error path Date: Tue, 28 May 2019 15:33:52 +0300 Message-Id: <20190528123352.21505-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org It's found while review and probably never happens, but real number of queues is set per device, and error path should be per device. Also correct label name for shared error path. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 634fc484a0b3..473d25ed59e3 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1399,7 +1399,7 @@ static int cpsw_ndo_open(struct net_device *ndev) ret = cpsw_fill_rx_channels(priv); if (ret < 0) - goto err_cleanup; + goto err_shared_cleanup; if (cpts_register(cpsw->cpts)) dev_err(priv->dev, "error registering cpts device\n"); @@ -1422,9 +1422,10 @@ static int cpsw_ndo_open(struct net_device *ndev) return 0; -err_cleanup: +err_shared_cleanup: cpdma_ctlr_stop(cpsw->dma); for_each_slave(priv, cpsw_slave_stop, cpsw); +err_cleanup: pm_runtime_put_sync(cpsw->dev); netif_carrier_off(priv->ndev); return ret;