Message ID | 20230816200410.62131-1-yann@sionneau.net |
---|---|
Headers | show |
Series | i2c: devm_pinctrl_get() usage fixes | expand |
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 > >