Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1519140

[PATCH v2 07/11] [media] rc: print correct variable for z8f0811

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH v2 07/11] [media] rc: print correct variable for z8f0811
Date 2016-11-10 17:50 +0100
Message-ID <sC0I2-h7-29@gated-at.bofh.it> (permalink)
References <sC0I2-h7-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


A recent rework accidentally left a debugging printk untouched
while changing the meaning of the variables, leading to an
uninitialized variable being printed:

drivers/media/i2c/ir-kbd-i2c.c: In function 'get_key_haup_common':
drivers/media/i2c/ir-kbd-i2c.c:62:2: error: 'toggle' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This prints the correct one instead, as we did before the patch.

Fixes: 00bb820755ed ("[media] rc: Hauppauge z8f0811 can decode RC6")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/i2c/ir-kbd-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I submitted this repeatedly as it is a v4.9 regression, but
I never saw a reply for it.

diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c
index f95a6bc..cede397 100644
--- a/drivers/media/i2c/ir-kbd-i2c.c
+++ b/drivers/media/i2c/ir-kbd-i2c.c
@@ -118,7 +118,7 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
 			*protocol = RC_TYPE_RC6_MCE;
 			dev &= 0x7f;
 			dprintk(1, "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n",
-						toggle, vendor, dev, code);
+						*ptoggle, vendor, dev, code);
 		} else {
 			*ptoggle = 0;
 			*protocol = RC_TYPE_RC6_6A_32;
-- 
2.9.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/11] getting back -Wmaybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 01/11] Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 06/11] [media] dib0700: fix nec repeat handling Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 10/11] pcmcia: fix return value of soc_pcmcia_regulator_set Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 07/11] [media] rc: print correct variable for z8f0811 Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 08/11] crypto: aesni: shut up -Wmaybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 02/11] NFSv4.1: work around -Wmaybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 11/11] Kbuild: enable -Wmaybe-uninitialized warnings by default Arnd Bergmann <arnd@arndb.de> - 2016-11-10 17:50 +0100
  [PATCH v2 09/11] [v3] infiniband: shut up a maybe-uninitialized warning Arnd Bergmann <arnd@arndb.de> - 2016-11-10 18:00 +0100
  [PATCH v2 03/11] x86: apm: avoid uninitialized data Arnd Bergmann <arnd@arndb.de> - 2016-11-10 18:00 +0100
  Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-11 18:20 +0100
    Re: [PATCH v2 00/11] getting back -Wmaybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2016-11-11 21:00 +0100

csiph-web