From patchwork Mon Apr 29 13:56:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10921837 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 EAD281390 for ; Mon, 29 Apr 2019 13:47:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D730E28803 for ; Mon, 29 Apr 2019 13:47:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA7FF2841F; Mon, 29 Apr 2019 13:47:02 +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 719D81FF40 for ; Mon, 29 Apr 2019 13:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727555AbfD2NrB (ORCPT ); Mon, 29 Apr 2019 09:47:01 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48282 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725838AbfD2NrB (ORCPT ); Mon, 29 Apr 2019 09:47:01 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A366693F2C37064144E6; Mon, 29 Apr 2019 21:46:57 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Apr 2019 21:46:47 +0800 From: YueHaibing To: Grygorii Strashko , Ivan Khoronzhuk , Andrew Lunn , Ilias Apalodimas CC: YueHaibing , , , Subject: [PATCH net-next] net: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() Date: Mon, 29 Apr 2019 13:56:50 +0000 Message-ID: <20190429135650.72794-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 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. Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn --- 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; }