linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Yann Sionneau <yann@sionneau.net>
Cc: linux-arm-kernel@lists.infradead.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Fabio Estevam <festevam@gmail.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Michal Simek <michal.simek@amd.com>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH 4/4] i2c: imx: devm_pinctrl_get() cannot return NULL
Date: Thu, 17 Aug 2023 06:46:29 +0200	[thread overview]
Message-ID: <20230817044629.GD28787@pengutronix.de> (raw)
In-Reply-To: <20230816200410.62131-5-yann@sionneau.net>

On Wed, Aug 16, 2023 at 10:04:10PM +0200, Yann Sionneau wrote:
> Remove unnecessary check against NULL for devm_pinctrl_get() return value.
> 
> Signed-off-by: Yann Sionneau <yann@sionneau.net>
> ---
>  drivers/i2c/busses/i2c-imx.c | 2 +-

Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thank you!

>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 65128a73e8a3..502276e8ded5 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1389,7 +1389,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
>  	struct i2c_bus_recovery_info *rinfo = &i2c_imx->rinfo;
>  
>  	i2c_imx->pinctrl = devm_pinctrl_get(&pdev->dev);
> -	if (!i2c_imx->pinctrl || IS_ERR(i2c_imx->pinctrl)) {
> +	if (IS_ERR(i2c_imx->pinctrl)) {
>  		dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
>  		return PTR_ERR(i2c_imx->pinctrl);
>  	}
> -- 
> 2.34.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2023-08-17  4:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 20:04 [PATCH 0/4] i2c: devm_pinctrl_get() usage fixes Yann Sionneau
2023-08-16 20:04 ` [PATCH 1/4] i2c: mv64xxx: devm_pinctrl_get() cannot return NULL Yann Sionneau
2023-08-25 21:11   ` Wolfram Sang
2023-08-16 20:04 ` [PATCH 2/4] i2c: at91-master: " Yann Sionneau
2023-09-05 10:42   ` Hari.PrasathGE
2023-08-16 20:04 ` [PATCH 3/4] i2c: i2c-cadence: Reset pinctrl to NULL in case devm_pinctrl_get() fails Yann Sionneau
2023-08-16 20:04 ` [PATCH 4/4] i2c: imx: devm_pinctrl_get() cannot return NULL Yann Sionneau
2023-08-17  4:46   ` Oleksij Rempel [this message]

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=20230817044629.GD28787@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --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-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=michal.simek@amd.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;
as well as URLs for NNTP newsgroup(s).