diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-10-14 10:33:28 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-10-19 05:36:09 +0200 |
commit | 44fccac4ff17371054f795f89e23f0b60bb516c1 (patch) | |
tree | 674c49048b0866886343b8780b03e7fed6ebd294 /drivers/power | |
parent | 93f7c27b4dc56f144b954424031baae0f6a0e808 (diff) |
power: supply: lp8788: remove an unneeded NULL check
We checked that "pdata->chg_params" is non-NULL earlier in this function
so when we add "i" to it, it's still non-NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/lp8788-charger.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c index 7321b727d484..509e2b341bd6 100644 --- a/drivers/power/supply/lp8788-charger.c +++ b/drivers/power/supply/lp8788-charger.c @@ -384,9 +384,6 @@ static int lp8788_update_charger_params(struct platform_device *pdev, for (i = 0; i < pdata->num_chg_params; i++) { param = pdata->chg_params + i; - if (!param) - continue; - if (lp8788_is_valid_charger_register(param->addr)) { ret = lp8788_write_byte(lp, param->addr, param->val); if (ret) |