diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-09-28 03:01:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-02 13:03:47 -0400 |
commit | 81c9bcfbefec212548058eeac612d98dc9290d55 (patch) | |
tree | 3e3c7c15daaa80ddbad6b3eab7f15bc60c3238df /drivers/media/platform | |
parent | d2331c991354a50bf65d114b2e88d77980223035 (diff) |
[media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 4486a2340532..5587ef15ca4f 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -1215,7 +1215,7 @@ static int s5p_mfc_suspend(struct device *dev) | |||
1215 | 1215 | ||
1216 | if (m_dev->num_inst == 0) | 1216 | if (m_dev->num_inst == 0) |
1217 | return 0; | 1217 | return 0; |
1218 | return s5p_mfc_sleep(m_dev); | 1218 | |
1219 | if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) { | 1219 | if (test_and_set_bit(0, &m_dev->enter_suspend) != 0) { |
1220 | mfc_err("Error: going to suspend for a second time\n"); | 1220 | mfc_err("Error: going to suspend for a second time\n"); |
1221 | return -EIO; | 1221 | return -EIO; |
@@ -1234,7 +1234,8 @@ static int s5p_mfc_suspend(struct device *dev) | |||
1234 | return -EIO; | 1234 | return -EIO; |
1235 | } | 1235 | } |
1236 | } | 1236 | } |
1237 | return 0; | 1237 | |
1238 | return s5p_mfc_sleep(m_dev); | ||
1238 | } | 1239 | } |
1239 | 1240 | ||
1240 | static int s5p_mfc_resume(struct device *dev) | 1241 | static int s5p_mfc_resume(struct device *dev) |