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>
This commit is contained in:
Dan Carpenter 2016-10-14 10:33:28 +03:00 committed by Sebastian Reichel
parent 93f7c27b4d
commit 44fccac4ff
1 changed files with 0 additions and 3 deletions

View File

@ -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)