From: Roel Kluin <12o3l@tiscali.nl>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
v4l-dvb-maintainer@linuxtv.org, video4linux-list@redhat.com,
lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] blackbird_find_mailbox negative return ignored in blackbird_initialize_codec()
Date: Wed, 23 Apr 2008 21:17:35 +0200 [thread overview]
Message-ID: <480F8B4F.9050605@tiscali.nl> (raw)
dev->mailbox is unsigned. so a negative return goes unnoticed
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index a99e9d5..07abd41 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -546,10 +546,12 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
if (retval < 0)
return retval;
- dev->mailbox = blackbird_find_mailbox(dev);
- if (dev->mailbox < 0)
+ retval = blackbird_find_mailbox(dev);
+ if (retval < 0)
return -1;
+ dev->mailbox = retval;
+
retval = blackbird_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */
if (retval < 0) {
dprintk(0, "ERROR: Firmware ping failed!\n");
reply other threads:[~2008-04-23 19:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=480F8B4F.9050605@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=v4l-dvb-maintainer@linuxtv.org \
--cc=video4linux-list@redhat.com \
/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