Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5528918ybl; Tue, 10 Dec 2019 07:29:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwpl6sDe8rA/yNiDnnaOeWX19cUDl9nB45fCmRPZrtmAYc8vuWlkeDETwkZCaNq8ryUa1ED X-Received: by 2002:a9d:6c8:: with SMTP id 66mr26023438otx.271.1575991774995; Tue, 10 Dec 2019 07:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575991774; cv=none; d=google.com; s=arc-20160816; b=OMi9Ay6F9LXK70RRJZ3Ur5em3o/kk7bEKTGeHjHDG5l0RrVWPrt3eST3KVrOIKwjJF PYPB1Wrzvr4Euhmn3NXnSngbniWXg5EgapOlg0DpctA7eDxoP9FYCXBZZMEZ6CxHjlQ+ bkFH6My3hoFNXyzubVV5hzVyXeaNglYhJau01iX8e4B5z8WbGsUpzpMZ5YNjfqrfhm/1 3NPQFNi5T+L5WMp7mOnh/xyppOVqmKOHxsiEAF0BSSV7Iio7Q02wwAD5C5t7TRDCyTkM WRQCNod65UCMuDeWGrlOlwjtMjjvM1mQKlBIGWr4SCks2UlK56iBV2BP9xzvNa6yGTtK afEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=di6itqzy1Kz6qTiVDOx+IF2EnF+F8GJNKypw7OnCAyA=; b=FwX8HDILrl03x3ahcuCZJqo36a8Mgn1H/iVX7fRW1o0y4XRSPOaqvIB3qv3ZROKd6E eMihUsmjHQFRyAxe2PIuUJ33BmUMsRBcbRhv8/KTLUPVzqtGoOylbYBj0W3NQURUxmVj v8esarQtjtFupqw7hxpY4PMMg6v+VR+EVI8p0BuK8oPDZ2VbHSYIqsFpaU95qPioQCBN 4tfR4qWRuA0G1UpEUeORh9oqN1HcA8SM/uuale+BeVyQd1R/LT1PRM6GUGTPw3J6xji7 LiuFGsQNchODHa4AN6UWZgdVQ2MlzD3pOtdadw9+P0TAFXYup9+qkIoP+2spi0nOfGVi 35EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b=erGq0mpw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si1936107ote.187.2019.12.10.07.29.21; Tue, 10 Dec 2019 07:29:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b=erGq0mpw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727526AbfLJP2y (ORCPT + 99 others); Tue, 10 Dec 2019 10:28:54 -0500 Received: from gateway20.websitewelcome.com ([192.185.55.25]:32992 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbfLJP2y (ORCPT ); Tue, 10 Dec 2019 10:28:54 -0500 X-Greylist: delayed 1460 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Dec 2019 10:28:53 EST Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway20.websitewelcome.com (Postfix) with ESMTP id EA00D400C7341 for ; Tue, 10 Dec 2019 07:54:09 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id eh3ti8BpkOdBHeh3uiHkLq; Tue, 10 Dec 2019 09:04:30 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Type:MIME-Version:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=di6itqzy1Kz6qTiVDOx+IF2EnF+F8GJNKypw7OnCAyA=; b=erGq0mpwB/ttMA8iQzgnj6nRSo +hvbQTfkTsD27mUp9UFIBDHI+BI28AiDkknua5jG2WGDSkz7QjmuB5pUmnQ1/EPO7bvGAqiFsKNbv 7JhHdQOKIZKtC8JbB1o9uqePw2KMJppguDO4R8zIV8Y5RylMmucnrgIRiE6BisnsLJA26BDckQsK3 n/V39u4QiRRB1Z+vVH4HML3zdh+fBi1S45x0FatjeCPHrIvfXTboKDEcQ5qx+tdmVqjLulGF1Yp0n wKDvCXjjCiBPdr9SQLESOUzgA1NaxQi96mutVxOeyMV839FA4kIz5aLYzxOnIPWyRU/BHag+gfcKu zH/v63zA==; Received: from [187.192.35.14] (port=36632 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.92) (envelope-from ) id 1ieh3s-000Syo-0a; Tue, 10 Dec 2019 09:04:28 -0600 Date: Tue, 10 Dec 2019 09:05:32 -0600 From: "Gustavo A. R. Silva" To: Dan Murphy , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Sean Nyekjaer Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR Message-ID: <20191210150532.GA12732@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.192.35.14 X-Source-L: No X-Exim-ID: 1ieh3s-000Syo-0a X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [187.192.35.14]:36632 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 8 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config. The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio. This bug was detected with the help of Coccinelle. Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO") Signed-off-by: Gustavo A. R. Silva --- drivers/net/can/m_can/tcan4x5x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index 4e1789ea2bc3..6676ecec48c3 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -355,7 +355,7 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake", GPIOD_OUT_HIGH); if (IS_ERR(tcan4x5x->device_wake_gpio)) { - if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER) + if (PTR_ERR(tcan4x5x->device_wake_gpio) == -EPROBE_DEFER) return -EPROBE_DEFER; tcan4x5x_disable_wake(cdev); -- 2.23.0