summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManinder Singh <maninder1.s@samsung.com>2015-07-08 12:26:47 +0530
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-09-05 13:19:05 +0200
commit617f6f7ef5bfe8c0ac580243c3da9a836c6e39bf (patch)
treeb259d9ffbc34c34a295ca3f0713907b2da08ee8f
parent508db592e2f54d731bf2f5eabd9642a1a566f276 (diff)
rtc: bq32k: remove redundant check
removing below static analysis error: (error) Possible null pointer dereference: client if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ^^^^^^^ Error comes because client is dereferenced before NULL check. So probably NULL this check is not required. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r--drivers/rtc/rtc-bq32k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 92679df6d6e2..409de9f1b604 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,