max732x_probe: remove redundant check
PATCH 1/1 max732x_probe: remove redundant check
The check : if (pdata) is redundant since its already dereferenced before: pdata->have_64bit_regs; pdata is not initialized after that hence remove this null check.
Signed-off-by Gaurav Singh <[email protected]>
--- drivers/gpio/gpio-max732x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-max732x.c +1 -1
@@ -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 )
Signature · 1 line
2.17.1
czw., 18 cze 2020 o 01:58 Gaurav Singh <[email protected]> napisał(a):
Quoted 25 lines
The check : if (pdata) is redundant since its already dereferenced before:
pdata->have_64bit_regs; pdata is not initialized after that hence remove this null check.Signed-off-by Gaurav Singh <[email protected]>--- drivers/gpio/gpio-max732x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-max732x.c +1
-2@@ -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 ) --
Quoted 2 lines
2.17.1
The subject should be 'gpio: max732x: ...". I fixed it up and applied the path to for-next.
Bartosz