Signed-off-by: Gaurav Singh <[email protected]>
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(-)
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 5fb0bcf31142..63472f308857 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)
--
2.17.1
On Sat, Jun 6, 2020 at 5:09 PM gaurav singh <[email protected]> wrote:
> The pdata is already checked for its validity above:
>
> if (!pdata) {
> dev_dbg(&client->dev, "no platform data\n");
> return -EINVAL;
> }
>
> So no need to check again. Hence remove the if (pdata) part. Please find the patch below.
Please send the patch as a single main using git send-email.
For further help see:
Documentation/process/email-clients.rst
Yours,
Linus Walleij
On Wed, Jun 10, 2020 at 1:36 PM Gaurav Singh <[email protected]> wrote:
> Signed-off-by: Gaurav Singh <[email protected]>
>
> 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
The pdata is already checked for its validity.
Remove the redundant check.
Signed-off-by: Gaurav Singh <[email protected]>
---
drivers/gpio/gpio-max732x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 5fb0bcf31142..63472f308857 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)
--
2.17.1