[media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 28 Sep 2012 07:01:35 +0000 (04:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 2 Oct 2012 17:03:47 +0000 (14:03 -0300)
return statement was wrongly placed before a code that needs to be
executed. Moved the return statement to the end of the function.
Tested suspend/resume on SMDK4412 board using 3.5-rc6 kernel.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c

index 4486a23405325f872f305e0a97608117dfb4f121..5587ef15ca4fa3d34a3db0e7fe70039ccbc62fc7 100644 (file)
@@ -1215,7 +1215,7 @@ static int s5p_mfc_suspend(struct device *dev)
 
        if (m_dev->num_inst == 0)
                return 0;
-       return s5p_mfc_sleep(m_dev);
+
        if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) {
                mfc_err("Error: going to suspend for a second time\n");
                return -EIO;
@@ -1234,7 +1234,8 @@ static int s5p_mfc_suspend(struct device *dev)
                        return -EIO;
                }
        }
-       return 0;
+
+       return s5p_mfc_sleep(m_dev);
 }
 
 static int s5p_mfc_resume(struct device *dev)