summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/s5c73m3
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-06-01 02:43:35 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 04:52:17 +0400
commita44e3b206a26e3978d1041b4145e5afc4ed52e86 (patch)
tree43eea9e12c6419d74bcba4b4d760fe57190d0b18 /drivers/media/i2c/s5c73m3
parente0e9f67afcd5e06bc1ff6ecbf130635673a41d48 (diff)
downloadlinux-a44e3b206a26e3978d1041b4145e5afc4ed52e86.tar.xz
[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: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/s5c73m3')
-rw-r--r--drivers/media/i2c/s5c73m3/s5c73m3-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index d3e867a7a565..402da96f5a71 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -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;
}