[media] s5p-csis: Do not use uninitialized variables in s5pcsis_suspend
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 18 May 2011 15:06:40 +0000 (12:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 14:32:57 +0000 (11:32 -0300)
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>
drivers/media/video/s5p-fimc/mipi-csis.c

index 760fc3c..ef056d6 100644 (file)
@@ -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;
                }