From patchwork Mon Apr 29 14:31:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10921859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBA29933 for ; Mon, 29 Apr 2019 14:25:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA4F2285B0 for ; Mon, 29 Apr 2019 14:25:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A88D4288F7; Mon, 29 Apr 2019 14:25:43 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 C0ACE285B0 for ; Mon, 29 Apr 2019 14:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728366AbfD2OZg (ORCPT ); Mon, 29 Apr 2019 10:25:36 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7709 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728254AbfD2OZf (ORCPT ); Mon, 29 Apr 2019 10:25:35 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D21DD5BC497B71DE06AC; Mon, 29 Apr 2019 22:22:01 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Apr 2019 22:21:55 +0800 From: YueHaibing To: Grygorii Strashko , Ivan Khoronzhuk , Andrew Lunn , Ilias Apalodimas CC: YueHaibing , , , Subject: [PATCH v2 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() Date: Mon, 29 Apr 2019 14:31:57 +0000 Message-ID: <20190429143157.79035-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190429135650.72794-1-yuehaibing@huawei.com> References: <20190429135650.72794-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected 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 Change the call to PTR_ERR to access the value just tested by IS_ERR. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn --- v2: add Fixes tag --- drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index c3cba46fac9d..e37680654a13 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2381,7 +2381,7 @@ static int cpsw_probe(struct platform_device *pdev) clk = devm_clk_get(dev, "fck"); if (IS_ERR(clk)) { - ret = PTR_ERR(mode); + ret = PTR_ERR(clk); dev_err(dev, "fck is not found %d\n", ret); return ret; }