Commit 258c0563 authored by Andre Bartke's avatar Andre Bartke Committed by Mauro Carvalho Chehab

[media] V4L: mx1-camera: fix uninitialized variable

mx1_camera_add_device() can return an uninitialized value of ret.
Signed-off-by: default avatarAndre Bartke <andre.bartke@gmail.com>
[g.liakhovetski@gmx.de: modified the fix to remove "ret" completely]
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 383e4f69
......@@ -444,12 +444,9 @@ static int mx1_camera_add_device(struct soc_camera_device *icd)
{
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct mx1_camera_dev *pcdev = ici->priv;
int ret;
if (pcdev->icd) {
ret = -EBUSY;
goto ebusy;
}
if (pcdev->icd)
return -EBUSY;
dev_info(icd->dev.parent, "MX1 Camera driver attached to camera %d\n",
icd->devnum);
......@@ -458,8 +455,7 @@ static int mx1_camera_add_device(struct soc_camera_device *icd)
pcdev->icd = icd;
ebusy:
return ret;
return 0;
}
static void mx1_camera_remove_device(struct soc_camera_device *icd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment