From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Sean Young <sean@mess.org>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] [media] rc: Fix uninitialized variable in debug print
Date: Thu, 13 Oct 2016 12:35:02 +0200 [thread overview]
Message-ID: <1476354902-16151-1-git-send-email-geert@linux-m68k.org> (raw)
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>
---
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
next reply other threads:[~2016-10-13 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 10:35 Geert Uytterhoeven [this message]
2016-10-13 20:15 ` [PATCH] [media] rc: Fix uninitialized variable in debug print Sean Young
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=1476354902-16151-1-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=sean@mess.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).