From: Gaurav Singh <gaurav1086@gmail.com>
To: gaurav1086@gmail.com, Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
linux-gpio@vger.kernel.org (open list:GPIO SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] max732x_probe: remove redundant check
Date: Wed, 10 Jun 2020 07:36:30 -0400 [thread overview]
Message-ID: <20200610113630.11922-1-gaurav1086@gmail.com> (raw)
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
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
next reply other threads:[~2020-06-10 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 11:36 Gaurav Singh [this message]
2020-06-20 20:16 ` [PATCH] max732x_probe: remove redundant check Linus Walleij
2020-06-20 22:40 ` Gaurav Singh
-- strict thread matches above, loose matches on Subject: below --
2020-06-17 23:58 Gaurav Singh
2020-06-22 16:50 ` Bartosz Golaszewski
[not found] <CAFAFadBs5UNsktWR072dXwvJpk-rk1wqPBCb=gkLfxMbE55QUQ@mail.gmail.com>
2020-06-10 10:02 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200610113630.11922-1-gaurav1086@gmail.com \
--to=gaurav1086@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).