From: Andre Bartke <andre.bartke@googlemail.com>
To: mchehab@infradead.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Andre Bartke <andre.bartke@gmail.com>
Subject: [PATCH] drivers/media: fix uninitialized variable
Date: Fri, 3 Jun 2011 19:22:01 +0200 [thread overview]
Message-ID: <1307121721-6658-1-git-send-email-andre.bartke@gmail.com> (raw)
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
next reply other threads:[~2011-06-03 17:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 17:22 Andre Bartke [this message]
2011-06-03 18:16 ` [PATCH] drivers/media: fix uninitialized variable Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307121721-6658-1-git-send-email-andre.bartke@gmail.com \
--to=andre.bartke@googlemail.com \
--cc=andre.bartke@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox