Skip to contentSkip to conversation

max732x_probe: remove redundant check

PATCH In review Gaurav Singh 2 participants 3 messages Jun 10, 2020 – Jun 20, 2020 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 max732x_probe: remove redundant check

The pdata is already checked for its validity. Remove this redundant check.

---
 drivers/gpio/gpio-max732x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-max732x.c +1 -1
index 5fb0bcf31142..63472f308857 100644
@@ -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
#1 lore raw
Quoted 4 lines · Gaurav Singh

The pdata is already checked for its validity. Remove this redundant check.

Patch applied.

Please put signed-off-by at the end of the mail.

Yours,
Linus Walleij

#2 lore raw

PATCH 1/1 max732x_probe: remove redundant check

In reply to Gaurav Singh

The pdata is already checked for its validity.
Remove the redundant check.

---
 drivers/gpio/gpio-max732x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-max732x.c +1 -1
index 5fb0bcf31142..63472f308857 100644
@@ -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