linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: imx: Remove a useless test in 'i2c_imx_init_recovery_info()'
@ 2017-08-06 23:49 Christophe JAILLET
  2017-08-07  6:36 ` Uwe Kleine-König
  0 siblings, 1 reply; 8+ messages in thread
From: Christophe JAILLET @ 2017-08-06 23:49 UTC (permalink / raw)
  To: wsa; +Cc: linux-i2c, linux-kernel, kernel-janitors, Christophe JAILLET

'devm_pinctrl_get()' never returns NULL, so this test can be simplified.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 54a47b40546f..7e84662fe1c0 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -997,7 +997,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.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-27 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-06 23:49 [PATCH] i2c: imx: Remove a useless test in 'i2c_imx_init_recovery_info()' Christophe JAILLET
2017-08-07  6:36 ` Uwe Kleine-König
2017-08-07  7:16   ` Julia Lawall
2017-08-08  6:44     ` Christophe JAILLET
2017-08-08  7:04       ` Julia Lawall
2017-08-08  7:40   ` Christophe JAILLET
2017-08-08  8:15     ` Uwe Kleine-König
2017-10-27 20:08       ` Wolfram Sang

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).