[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170806234953.30682-1-christophe.jaillet@wanadoo.fr>
Date: Mon, 7 Aug 2017 01:49:53 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: wsa@...-dreams.de
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] i2c: imx: Remove a useless test in 'i2c_imx_init_recovery_info()'
'devm_pinctrl_get()' never returns NULL, so this test can be simplified.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.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
Powered by blists - more mailing lists