From: Dan Carpenter <error27@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>,
Olivier Grenie <olivier.grenie@dibcom.fr>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/2] [media] dib9000: fix return type in
Date: Wed, 19 Jan 2011 14:28:27 +0000 [thread overview]
Message-ID: <20110119142827.GP2721@bicker> (raw)
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>
diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c
index 43fb6e4..9151876 100644
--- a/drivers/media/dvb/frontends/dib9000.c
+++ b/drivers/media/dvb/frontends/dib9000.c
@@ -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;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>,
Olivier Grenie <olivier.grenie@dibcom.fr>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/2] [media] dib9000: fix return type in dib9000_mbx_send_attr()
Date: Wed, 19 Jan 2011 17:28:27 +0300 [thread overview]
Message-ID: <20110119142827.GP2721@bicker> (raw)
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>
diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c
index 43fb6e4..9151876 100644
--- a/drivers/media/dvb/frontends/dib9000.c
+++ b/drivers/media/dvb/frontends/dib9000.c
@@ -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;
next reply other threads:[~2011-01-19 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 14:28 Dan Carpenter [this message]
2011-01-19 14:28 ` [patch 1/2] [media] dib9000: fix return type in dib9000_mbx_send_attr() Dan Carpenter
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=20110119142827.GP2721@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=olivier.grenie@dibcom.fr \
--cc=patrick.boettcher@dibcom.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.