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

mx1_camera_add_device() can return an uninitialized value of ret.

Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
[g.liakhovetski@gmx.de: modified the fix to remove "ret" completely]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Andre Bartke 2011-06-10 07:57:54 -03:00 committed by Mauro Carvalho Chehab
parent 383e4f6987
commit 258c05637d

View file

@ -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 soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct mx1_camera_dev *pcdev = ici->priv; struct mx1_camera_dev *pcdev = ici->priv;
int ret;
if (pcdev->icd) { if (pcdev->icd)
ret = -EBUSY; return -EBUSY;
goto ebusy;
}
dev_info(icd->dev.parent, "MX1 Camera driver attached to camera %d\n", dev_info(icd->dev.parent, "MX1 Camera driver attached to camera %d\n",
icd->devnum); icd->devnum);
@ -458,8 +455,7 @@ static int mx1_camera_add_device(struct soc_camera_device *icd)
pcdev->icd = icd; pcdev->icd = icd;
ebusy: return 0;
return ret;
} }
static void mx1_camera_remove_device(struct soc_camera_device *icd) static void mx1_camera_remove_device(struct soc_camera_device *icd)