提交 a44e3b20 编写于 作者: S Sylwester Nawrocki 提交者: Mauro Carvalho Chehab

[media] s5c73m3: Do not ignore errors from regulator_enable()

This fixes following compilation warning:
drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘__s5c73m3_power_off’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:1389:19: warning: ignoring return value
of ‘regulator_enable’, declared with attribute warn_unused_result
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e0e9f67a
......@@ -1385,9 +1385,12 @@ static int __s5c73m3_power_off(struct s5c73m3 *state)
}
return 0;
err:
for (++i; i < S5C73M3_MAX_SUPPLIES; i++)
regulator_enable(state->supplies[i].consumer);
for (++i; i < S5C73M3_MAX_SUPPLIES; i++) {
int r = regulator_enable(state->supplies[i].consumer);
if (r < 0)
v4l2_err(&state->oif_sd, "Failed to reenable %s: %d\n",
state->supplies[i].supply, r);
}
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册