]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7733): blackbird_find_mailbox negative return ignored in blackbird_initializ...
authorRoel Kluin <12o3l@tiscali.nl>
Sat, 26 Apr 2008 14:25:18 +0000 (11:25 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 26 Apr 2008 12:10:48 +0000 (09:10 -0300)
dev->mailbox is unsigned. so a negative return goes unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx88/cx88-blackbird.c

index 61c4f72644b8d2e56ee391915d51409d1922c425..6c0c94c5ef91113e8b875b52f823c1e2cccb50c5 100644 (file)
@@ -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");