summaryrefslogtreecommitdiff
path: root/drivers/media/video/s5p-fimc/mipi-csis.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-05-18 12:06:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 11:32:57 -0300
commitc68956c14b6accaf6371c8db26deb23fe8e3a3f3 (patch)
treefed9a29eeebce1f2d7cea36f247f868237b0ca85 /drivers/media/video/s5p-fimc/mipi-csis.c
parentb5f1220d587df8d62372c11e05d44af14056295f (diff)
[media] s5p-csis: Do not use uninitialized variables in s5pcsis_suspend
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc/mipi-csis.c')
-rw-r--r--drivers/media/video/s5p-fimc/mipi-csis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/s5p-fimc/mipi-csis.c b/drivers/media/video/s5p-fimc/mipi-csis.c
index 760fc3c30bf8..ef056d6605ca 100644
--- a/drivers/media/video/s5p-fimc/mipi-csis.c
+++ b/drivers/media/video/s5p-fimc/mipi-csis.c
@@ -581,7 +581,7 @@ static int s5pcsis_suspend(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct v4l2_subdev *sd = platform_get_drvdata(pdev);
struct csis_state *state = sd_to_csis_state(sd);
- int ret;
+ int ret = 0;
v4l2_dbg(1, debug, sd, "%s: flags: 0x%x\n",
__func__, state->flags);
@@ -630,7 +630,7 @@ static int s5pcsis_resume(struct device *dev)
ret = pdata->phy_enable(state->pdev, true);
if (!ret) {
state->flags |= ST_POWERED;
- } else {
+ } else if (state->supply) {
regulator_disable(state->supply);
goto unlock;
}