]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] redrat3: change return argument on redrat3_send_cmd() to int
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 29 Apr 2015 18:00:30 +0000 (15:00 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 09:10:38 +0000 (06:10 -0300)
redrat3_send_cmd() can return an error or the read data. However,
it currently returns an u8, as reported by smatch:
drivers/media/rc/redrat3.c:416 redrat3_send_cmd() warn: signedness bug returning '(-12)'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/redrat3.c

index c4def66f9aa2cac019a6abd9bc2070644fe8a42a..c83292ad1b34426e9bfc322349c3a63c0a0f2454 100644 (file)
@@ -405,7 +405,7 @@ static void redrat3_process_ir_data(struct redrat3_dev *rr3)
 }
 
 /* Util fn to send rr3 cmds */
-static u8 redrat3_send_cmd(int cmd, struct redrat3_dev *rr3)
+static int redrat3_send_cmd(int cmd, struct redrat3_dev *rr3)
 {
        struct usb_device *udev;
        u8 *data;