Message ID | 20230816200410.62131-2-yann@sionneau.net |
---|---|
State | New |
Headers | show |
Series | i2c: devm_pinctrl_get() usage fixes | expand |
On Wed, Aug 16, 2023 at 10:04:07PM +0200, Yann Sionneau wrote: > Remove unnecessary check against NULL for devm_pinctrl_get() return value. > > Signed-off-by: Yann Sionneau <yann@sionneau.net> As discussed elsewhere, it can be NULL when pinctrl is not selected.
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index fd8403b07fa6..0c4a0110978f 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -947,8 +947,6 @@ static int mv64xxx_i2c_init_recovery_info(struct mv64xxx_i2c_data *drv_data, return -EPROBE_DEFER; dev_info(dev, "can't get pinctrl, bus recovery not supported\n"); return PTR_ERR(rinfo->pinctrl); - } else if (!rinfo->pinctrl) { - return -ENODEV; } drv_data->adapter.bus_recovery_info = rinfo;
Remove unnecessary check against NULL for devm_pinctrl_get() return value. Signed-off-by: Yann Sionneau <yann@sionneau.net> --- drivers/i2c/busses/i2c-mv64xxx.c | 2 -- 1 file changed, 2 deletions(-)