diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-12-11 11:15:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-16 09:27:15 -0200 |
commit | 6ed7c03884ee7c05ff880cafb46ae20915e22e3c (patch) | |
tree | c412d8ec7f77b5108a93111114691d05fbe2f8b5 /drivers/media | |
parent | 5d28d525452f170e30bc038955439731462a5228 (diff) | |
download | linux-3.10-6ed7c03884ee7c05ff880cafb46ae20915e22e3c.tar.gz linux-3.10-6ed7c03884ee7c05ff880cafb46ae20915e22e3c.tar.bz2 linux-3.10-6ed7c03884ee7c05ff880cafb46ae20915e22e3c.zip |
V4L/DVB (13646): sh_mobile_ceu_camera: do not mark host occupied, when adding a client fails
Currently, if resetting the host interface, when adding a new client, fails, a
negative error code is returned, but the host is still marked as occupied. Fix
this bug.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 7 |
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) { struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); struct sh_mobile_ceu_dev *pcdev = ici->priv; + int ret; if (pcdev->icd) return -EBUSY; @@ -469,9 +470,11 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd) pm_runtime_get_sync(ici->v4l2_dev.dev); - pcdev->icd = icd; + ret = sh_mobile_ceu_soft_reset(pcdev); + if (!ret) + pcdev->icd = icd; - return sh_mobile_ceu_soft_reset(pcdev); + return ret; } /* Called with .video_lock held */ |