[media] s5c73m3: Do not ignore errors from regulator_enable()
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 31 May 2013 22:43:35 +0000 (19:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Jun 2013 00:52:17 +0000 (21:52 -0300)
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>
drivers/media/i2c/s5c73m3/s5c73m3-core.c

index d3e867a7a565272f947a062c3a93b8dfb5a091db..402da96f5a7102a1fe7dc3805bb073efacc4cdc1 100644 (file)
@@ -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;
 }