public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Yann Sionneau <yann@sionneau.net>
Cc: Ruan Jinjie <ruanjinjie@huawei.com>,
	linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH -next] I2C: Use helper function IS_ERR_OR_NULL()
Date: Wed, 16 Aug 2023 11:22:28 +0100	[thread overview]
Message-ID: <ZNyjZFjfIrsxIfn1@shell.armlinux.org.uk> (raw)
In-Reply-To: <17f4ce7f-5954-519b-fc62-42655d198933@sionneau.net>

On Wed, Aug 16, 2023 at 11:51:54AM +0200, Yann Sionneau wrote:
> Le 16/08/2023 à 11:46, Ruan Jinjie a écrit :
> 
> > Use IS_ERR_OR_NULL() instead of open-coding it
> > to simplify the code.
> >   	rinfo->pinctrl = 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!

  reply	other threads:[~2023-08-16 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16  9:46 [PATCH -next] I2C: Use helper function IS_ERR_OR_NULL() Ruan Jinjie
2023-08-16  9:48 ` Ruan Jinjie
2023-08-16 10:08   ` Russell King (Oracle)
2023-08-17  1:38     ` Ruan Jinjie
2023-08-16  9:51 ` Yann Sionneau
2023-08-16 10:22   ` Russell King (Oracle) [this message]
2023-08-16 10:22 ` Russell King (Oracle)
2023-08-17  1:39   ` Ruan Jinjie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNyjZFjfIrsxIfn1@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andi.shyti@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=codrin.ciubotariu@microchip.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux@rempel-privat.de \
    --cc=nicolas.ferre@microchip.com \
    --cc=ruanjinjie@huawei.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=yann@sionneau.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox