gpio: max732x: remove redundant check from probe()
authorGaurav Singh <gaurav1086@gmail.com>
Sat, 20 Jun 2020 22:40:53 +0000 (18:40 -0400)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 22 Jun 2020 16:50:01 +0000 (18:50 +0200)
The pdata is already checked for its validity.
Remove the redundant check.

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-max732x.c

index 5fb0bcf..63472f3 100644 (file)
@@ -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)