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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
5d28d52545
commit
6ed7c03884
@@ -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 soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
|
||||||
struct sh_mobile_ceu_dev *pcdev = ici->priv;
|
struct sh_mobile_ceu_dev *pcdev = ici->priv;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (pcdev->icd)
|
if (pcdev->icd)
|
||||||
return -EBUSY;
|
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);
|
pm_runtime_get_sync(ici->v4l2_dev.dev);
|
||||||
|
|
||||||
|
ret = sh_mobile_ceu_soft_reset(pcdev);
|
||||||
|
if (!ret)
|
||||||
pcdev->icd = icd;
|
pcdev->icd = icd;
|
||||||
|
|
||||||
return sh_mobile_ceu_soft_reset(pcdev);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called with .video_lock held */
|
/* Called with .video_lock held */
|
||||||
|
Reference in New Issue
Block a user