From: Gaurav Singh Date: Sat, 20 Jun 2020 22:40:53 +0000 (-0400) Subject: gpio: max732x: remove redundant check from probe() X-Git-Tag: v5.15~3204^2~40^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8346b92ecddfae624b1dd4631e840fb98f5430cd;p=platform%2Fkernel%2Flinux-starfive.git gpio: max732x: remove redundant check from probe() The pdata is already checked for its validity. Remove the redundant check. Signed-off-by: Gaurav Singh Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c index 5fb0bcf..63472f3 100644 --- a/drivers/gpio/gpio-max732x.c +++ b/drivers/gpio/gpio-max732x.c @@ -703,7 +703,7 @@ static int max732x_probe(struct i2c_client *client, if (ret) return ret; - if (pdata && pdata->setup) { + if (pdata->setup) { ret = pdata->setup(client, chip->gpio_chip.base, chip->gpio_chip.ngpio, pdata->context); if (ret < 0)