提交 44fccac4 编写于 作者: D Dan Carpenter 提交者: Sebastian Reichel

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NMilo Kim <milo.kim@ti.com>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 93f7c27b
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册