Skip to contentSkip to conversation

drivers/media: fix uninitialized variable

PATCH In review Andre Bartke 2 participants 2 messages Jun 3, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/media: fix uninitialized variable

mx1_camera_add_device() can return an
uninitialized value of ret.

---
 drivers/media/video/mx1_camera.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/mx1_camera.c +1 -1
index bc0c23a..d9fc4b2 100644
@@ -444,7 +444,7 @@ 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;
+	int ret = 0;
 
 	if (pcdev->icd) {
 		ret = -EBUSY;
Signature · 1 line
1.7.5.2
#1 lore raw
Quoted 4 lines · Andre Bartke

mx1_camera_add_device() can return an
uninitialized value of ret.

Thanks, will push to 3.0

Guennadi

Quoted 25 lines
---
 drivers/media/video/mx1_camera.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/mx1_camera.c +1 -1
index bc0c23a..d9fc4b2 100644
@@ -444,7 +444,7 @@ 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;
+	int ret = 0;
 
 	if (pcdev->icd) {
 		ret = -EBUSY;
Signature · 6 lines
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/