From patchwork Tue Apr 30 01:55:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10922679 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 0EF05933 for ; Tue, 30 Apr 2019 01:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F199528A25 for ; Tue, 30 Apr 2019 01:45:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E548A28A41; Tue, 30 Apr 2019 01:45:36 +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 7E59628A25 for ; Tue, 30 Apr 2019 01:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729847AbfD3Bpe (ORCPT ); Mon, 29 Apr 2019 21:45:34 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54162 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729238AbfD3Bpe (ORCPT ); Mon, 29 Apr 2019 21:45:34 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3A5E35E79536056B8EF8; Tue, 30 Apr 2019 09:45:32 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Tue, 30 Apr 2019 09:45:24 +0800 From: YueHaibing To: Grygorii Strashko , Ivan Khoronzhuk , Andrew Lunn , Ilias Apalodimas , CC: YueHaibing , , , Subject: [PATCH v3 net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() Date: Tue, 30 Apr 2019 01:55:24 +0000 Message-ID: <20190430015524.50997-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190429143157.79035-1-yuehaibing@huawei.com> References: <20190429143157.79035-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 Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe, The proper pointer to use is clk instead of mode. This issue was detected with the help of Coccinelle. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn --- v3: Fix commit log 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; }