From patchwork Fri Aug 26 14:35:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9301425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E06DC607EE for ; Fri, 26 Aug 2016 14:51:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D16DE29635 for ; Fri, 26 Aug 2016 14:51:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5B9D29644; Fri, 26 Aug 2016 14:51:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CFC229635 for ; Fri, 26 Aug 2016 14:51:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753514AbcHZOv3 (ORCPT ); Fri, 26 Aug 2016 10:51:29 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36769 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752176AbcHZOv2 (ORCPT ); Fri, 26 Aug 2016 10:51:28 -0400 Received: by mail-pf0-f196.google.com with SMTP id y134so5020107pfg.3; Fri, 26 Aug 2016 07:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a1o3o0B7HF/M33sjeijbappwfblQd6+J31LwY/djZkE=; b=fZqV7p4gMVaMNuXPhsV5I3bLdf3bDmTPomQnCfq2jdyerQ6/Rk1kVdwmw8et06qwOq XArls0is16gzaqXtwls0e7I/u4/P/cUcd02hsFvhNwIADsabOMEqwh7yLfWNCLHyodS2 vWZr4wwNvsnbCm/SYhsZmdCAeIvIwx826akINXI9GkHGRauiXwCx1bsCwbYsGOI3IP0D PV9ppQQhhCaJwBB4SNzMx010hFb4UjrLOsss75KyKJbE3Z8fSSHBhXuApx+EXKvkkA5O z6TEttAYqoS2aBzQRAOcvWP4mntIFmva/h5/MTK8AInx+EDrUNdYnil+yUk4hg2wwr8h EFsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a1o3o0B7HF/M33sjeijbappwfblQd6+J31LwY/djZkE=; b=FcOxaLHnRuEzeFFGmeIw7GIWND7VRaC/JU60OSGZJAdnSMoLPAV+kDrmSlCLVEFIaf gLRqKSID34wQ65llbC91rWYJiT/VJIT8T9CAbBzi8KV+hqJLbwjFRLVKktowmGh8XOJp 0j/bOUMNhgzsh9CbS/LKKLyumoiglaOZyUjujS7lsStH9mIiN7y4hWla2uUP53L49mft vhFCtzKnDNyXdw9zALzpvnwbXn2F6SiBro+0f/6Z9/PNDQIbX4+iH4rjrHaQatjqo0dX MYZKXsv/4NS43fVFojy0Fx69nyFCZPTupQAB8alC5JEX7jzCnhSG4RLVRY9aituIFk48 4Rbg== X-Gm-Message-State: AE9vXwPQ8o3wTZoXmP6fFV8cAeCECA/NkocSf16nKh1ZsBxpjcgN4Hld5yJpxxyPy+Gn+w== X-Received: by 10.98.103.70 with SMTP id b67mr6682121pfc.30.1472222168416; Fri, 26 Aug 2016 07:36:08 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id g10sm29332557pfc.57.2016.08.26.07.36.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Aug 2016 07:36:07 -0700 (PDT) From: Wei Yongjun To: Mugunthan V N , Grygorii Strashko , Ivan Khoronzhuk Cc: Wei Yongjun , linux-omap@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH -next] net: ethernet: ti: cpsw: fix error return code in cpsw_set_channels() Date: Fri, 26 Aug 2016 14:35:43 +0000 Message-Id: <1472222143-3604-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the cpsw_fill_rx_channels() error handling case instead of 0, as done elsewhere in this function. Fixes: ce52c744574b ("net: ethernet: ti: cpsw: add ethtool channels support") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/cpsw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 4273e7f..c6cff3d 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2217,7 +2217,8 @@ static int cpsw_set_channels(struct net_device *ndev, } if (cpsw_common_res_usage_state(cpsw)) { - if (cpsw_fill_rx_channels(priv)) + ret = cpsw_fill_rx_channels(priv); + if (ret) goto err; /* After this receive is started */