From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3613EC001B0 for ; Wed, 16 Aug 2023 10:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uLFUVACltG3iIZs7cAgyhIxIr63wyejNeA69UmPDwgA=; b=a8LQGMkDJ5EtEA POIM7cKBwMaK9+xzQLIGMdbnVJKvti96yuK9E6Ck1fyoKokS6f+0FZpNL1wypBYYWT1o0/eiQl/AG ymJs9EGYyUrggfcsjPCVLbXO3ceXQcXtIxa6/iX6ilVvyFPgD+P0IDP7ie8vrE/r8bmUonKn0ftYv wNsngZ2+uSPdj9fyvVHXJMqgt0idimyHjnq7jWYBYg8CNB9muiQBN3gPh/Rw2AMDi7VHONq3PLYWU NjfTtQifhuXmZMutDkk1MgF/HREnNnRSLAKaLodHuciERaPiI95qAOcPfAkXY/x7SDZHKsaf8bpYx oGYp5wJpxFg+8pA3a1Cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWDfe-003lJ8-3A; Wed, 16 Aug 2023 10:22:34 +0000 Received: from [2001:4d48:ad52:32c8:5054:ff:fe00:142] (helo=pandora.armlinux.org.uk) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWDfc-003lGG-15 for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 10:22:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rtmTw3BxJfSzf7/4fecn/q3SQ2mDfYBmxq1I2TSiu/Q=; b=xrq6KGlIJ5Lr0+l+aCtcv5RXoK e9dFpbEpJlg30vb55usE5+AzkPghuEIohy8ouFRFoFtNnsGbq0W0KyGRpwxhUIQZahEcagLqv9+Sq A6HmNE2dXKT2I7M91m5dSNboH/C8vxx/mWSy0L5mY39BMug+JPB0qvgMyFOhjnHoX+c3BIdgE77EU V+ZlYn9sKhzgUij0QSKWoeaBdpid+sO6dp5Oy4kFJIC8mOXrsdtMlV36onai/UEpe7M7ra8ZfpQRU b0FS/zqPvq6NJQyF1Zq5FTDIGdXRTl0piMyvA9LQNobcxO6RMWyWvElTC/5kLEOjHWm5thA/7K3gE OG5VARBQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44934) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qWDfY-0002ei-05; Wed, 16 Aug 2023 11:22:28 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qWDfY-0007wN-3H; Wed, 16 Aug 2023 11:22:28 +0100 Date: Wed, 16 Aug 2023 11:22:28 +0100 From: "Russell King (Oracle)" To: Yann Sionneau Subject: Re: [PATCH -next] I2C: Use helper function IS_ERR_OR_NULL() Message-ID: References: <20230816094618.2854084-1-ruanjinjie@huawei.com> <17f4ce7f-5954-519b-fc62-42655d198933@sionneau.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <17f4ce7f-5954-519b-fc62-42655d198933@sionneau.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_032232_375992_04771EB2 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Andi Shyti , Fabio Estevam , Ruan Jinjie , Claudiu Beznea , linux-i2c@vger.kernel.org, Pengutronix Kernel Team , Codrin Ciubotariu , Oleksij Rempel , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org, NXP Linux Team Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 16, 2023 at 11:51:54AM +0200, Yann Sionneau wrote: > Le 16/08/2023 =E0 11:46, Ruan Jinjie a =E9crit=A0: > = > > Use IS_ERR_OR_NULL() instead of open-coding it > > to simplify the code. > > rinfo->pinctrl =3D devm_pinctrl_get(&pdev->dev); > > - if (!rinfo->pinctrl || IS_ERR(rinfo->pinctrl)) { > > + if (IS_ERR_OR_NULL(rinfo->pinctrl)) { > = > Can the return of devm_pinctrl_get really be NULL? No. -- = RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel