There is no need to perform a check for optional GPIO descriptor. If it's NULL, the API can handle it correctly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/i2c/muxes/i2c-mux-pca954x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 2e42a113ef1f..fe4320fc0b91 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -444,12 +444,12 @@ static int pca954x_probe(struct i2c_client *client, gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(gpio)) return PTR_ERR(gpio); - if (gpio) { - udelay(1); - gpiod_set_value_cansleep(gpio, 0); - /* Give the chip some time to recover. */ - udelay(1); - } + + /* Reset the multiplexer */ + udelay(1); + gpiod_set_value_cansleep(gpio, 0); + /* Give the chip some time to recover. */ + udelay(1); data->chip = device_get_match_data(dev); if (!data->chip) -- 2.25.1