[media] dib9000: fix return type in dib9000_mbx_send_attr()
authorDan Carpenter <error27@gmail.com>
Wed, 19 Jan 2011 14:28:27 +0000 (11:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 21 Mar 2011 23:32:39 +0000 (20:32 -0300)
dib9000_mbx_send_attr() returns an int.  It doesn't work to save
negative error codes in an unsigned char, so I've made "ret" an int
type.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/dib9000.c

index 43fb6e45424a7297de37786d17c9a1813c257e8d..91518761a2da96b67595cc7dcea842289e06999d 100644 (file)
@@ -486,10 +486,11 @@ static int dib9000_mbx_host_init(struct dib9000_state *state, u8 risc_id)
 #define MAX_MAILBOX_TRY 100
 static int dib9000_mbx_send_attr(struct dib9000_state *state, u8 id, u16 * data, u8 len, u16 attr)
 {
-       u8 ret = 0, *d, b[2];
+       u8 *d, b[2];
        u16 tmp;
        u16 size;
        u32 i;
+       int ret = 0;
 
        if (!state->platform.risc.fw_is_running)
                return -EINVAL;