aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/sh_mobile_ceu_camera.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 3271944f261..2a38e1d9061 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -459,6 +459,7 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
459{ 459{
460 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); 460 struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
461 struct sh_mobile_ceu_dev *pcdev = ici->priv; 461 struct sh_mobile_ceu_dev *pcdev = ici->priv;
462 int ret;
462 463
463 if (pcdev->icd) 464 if (pcdev->icd)
464 return -EBUSY; 465 return -EBUSY;
@@ -469,9 +470,11 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
469 470
470 pm_runtime_get_sync(ici->v4l2_dev.dev); 471 pm_runtime_get_sync(ici->v4l2_dev.dev);
471 472
472 pcdev->icd = icd; 473 ret = sh_mobile_ceu_soft_reset(pcdev);
474 if (!ret)
475 pcdev->icd = icd;
473 476
474 return sh_mobile_ceu_soft_reset(pcdev); 477 return ret;
475} 478}
476 479
477/* Called with .video_lock held */ 480/* Called with .video_lock held */