[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMpxmJW40AO9bEf2LPHk7Pbu_r4tgczaR6uJ6iyHPa8gUmR0=w@mail.gmail.com>
Date: Mon, 22 Jun 2020 18:50:40 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Gaurav Singh <gaurav1086@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] max732x_probe: remove redundant check
czw., 18 cze 2020 o 01:58 Gaurav Singh <gaurav1086@...il.com> napisaĆ(a):
>
> 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 <gaurav1086@...il.com>
> ---
> 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
>
The subject should be 'gpio: max732x: ...". I fixed it up and applied
the path to for-next.
Bartosz
Powered by blists - more mailing lists