From: Maninder Singh <maninder1.s@samsung.com>
To: a.zummo@towertech.it, alexandre.belloni@free-electrons.com,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Cc: pankaj.m@samsung.com, Maninder Singh <maninder1.s@samsung.com>
Subject: [PATCH 1/1] drivers/rtc/rtc-bq32k.c: remove redundant check
Date: Wed, 08 Jul 2015 12:26:47 +0530 [thread overview]
Message-ID: <1436338607-43389-1-git-send-email-maninder1.s@samsung.com> (raw)
removing below static analysis error:-
(error) Possible null pointer dereference: client
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
^^^^^^^
Error comes beacause client is dereferenced before NULL check.
So probabily NULL this check is not required.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
---
drivers/rtc/rtc-bq32k.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 92679df..409de9f 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -212,7 +212,7 @@ static int bq32k_probe(struct i2c_client *client,
if (error)
return error;
- if (client && client->dev.of_node)
+ if (client->dev.of_node)
trickle_charger_of_init(dev, client->dev.of_node);
rtc = devm_rtc_device_register(&client->dev, bq32k_driver.driver.name,
--
1.7.9.5
next reply other threads:[~2015-07-08 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 6:56 Maninder Singh [this message]
2015-07-14 22:41 ` Alexandre Belloni
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=1436338607-43389-1-git-send-email-maninder1.s@samsung.com \
--to=maninder1.s@samsung.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.m@samsung.com \
--cc=rtc-linux@googlegroups.com \
/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
all inboxes | Powered by JetHome®