public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/media: fix uninitialized variable
@ 2011-06-03 17:22 Andre Bartke
  2011-06-03 18:16 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 2+ messages in thread
From: Andre Bartke @ 2011-06-03 17:22 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media, linux-kernel, Andre Bartke

mx1_camera_add_device() can return an
uninitialized value of ret.

Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
---
 drivers/media/video/mx1_camera.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c
index bc0c23a..d9fc4b2 100644
--- a/drivers/media/video/mx1_camera.c
+++ b/drivers/media/video/mx1_camera.c
@@ -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;
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-03 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 17:22 [PATCH] drivers/media: fix uninitialized variable Andre Bartke
2011-06-03 18:16 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox