]> git.karo-electronics.de Git - linux-beck.git/commitdiff
power: supply: lp8788: remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 07:33:28 +0000 (10:33 +0300)
committerSebastian Reichel <sre@kernel.org>
Wed, 19 Oct 2016 03:36:09 +0000 (05:36 +0200)
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>
drivers/power/supply/lp8788-charger.c

index 7321b727d484555a2befa146a2deb910d808b49d..509e2b341bd64c54aec3ec68b69b1854dc593550 100644 (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)