From: Sean Young <sean@mess.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [media] rc: Fix uninitialized variable in debug print
Date: Thu, 13 Oct 2016 21:15:51 +0100 [thread overview]
Message-ID: <20161013201551.GA21731@gofer.mess.org> (raw)
In-Reply-To: <1476354902-16151-1-git-send-email-geert@linux-m68k.org>
On Thu, Oct 13, 2016 at 12:35:02PM +0200, Geert Uytterhoeven wrote:
> drivers/media/i2c/ir-kbd-i2c.c: In function ‘get_key_haup_common’:
> drivers/media/i2c/ir-kbd-i2c.c:120: warning: ‘toggle’ is used uninitialized in this function
>
> To fix this, use the intermediate "toggle" variable, like is done in
> other branches.
>
> Fixes: 00bb820755ed8ee9 ("[media] rc: Hauppauge z8f0811 can decode RC6")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks for finding this and writing a patch.
Acked-by: Sean Young <sean@mess.org>
> ---
> drivers/media/i2c/ir-kbd-i2c.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c
> index f95a6bc839d58f5f..0ab8e226c4cc0d19 100644
> --- a/drivers/media/i2c/ir-kbd-i2c.c
> +++ b/drivers/media/i2c/ir-kbd-i2c.c
> @@ -114,7 +114,8 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
> vendor = get_unaligned_be16(buf + 1);
>
> if (vendor == 0x800f) {
> - *ptoggle = (dev & 0x80) != 0;
> + toggle = (dev & 0x80) != 0;
> + *ptoggle = toggle;
> *protocol = RC_TYPE_RC6_MCE;
> dev &= 0x7f;
> dprintk(1, "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n",
> --
> 1.9.1
prev parent reply other threads:[~2016-10-13 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 10:35 [PATCH] [media] rc: Fix uninitialized variable in debug print Geert Uytterhoeven
2016-10-13 20:15 ` Sean Young [this message]
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=20161013201551.GA21731@gofer.mess.org \
--to=sean@mess.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@s-opensource.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 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.