linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: Fix get_key_haup_common.isra.4() debug message to print ptoggle value
@ 2016-11-07 15:41 Shuah Khan
  2016-11-07 15:41 ` [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion() Shuah Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Shuah Khan @ 2016-11-07 15:41 UTC (permalink / raw)
  To: mchehab, javier, arnd, sean; +Cc: Shuah Khan, linux-media, linux-kernel

Fix the debug message in get_key_haup_common.isra.4() doesn't print the
correct toggle value. Fix it. This shows up as an used uninitialized warn
message:

drivers/media/i2c/ir-kbd-i2c.c: In function ‘get_key_haup_common.isra.4’:
 drivers/media/i2c/ir-kbd-i2c.c:62:2: warning: ‘toggle’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   printk(KERN_DEBUG MODULE_NAME ": " fmt , ## arg)
   ^~~~~~
 drivers/media/i2c/ir-kbd-i2c.c:70:20: note: ‘toggle’ was declared here
   int start, range, toggle, dev, code, ircode, vendor;
                     ^~~~~~

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/i2c/ir-kbd-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-08 23:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 15:41 [PATCH] media: Fix get_key_haup_common.isra.4() debug message to print ptoggle value Shuah Khan
2016-11-07 15:41 ` [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion() Shuah Khan
2016-11-08 11:23   ` Sean Young
2016-11-07 15:41 ` [PATCH] net/netfiliter: Fix used uninitialized warn in ip_vs_proc_sync_conn() Shuah Khan
2016-11-07 15:44   ` Anna Schumaker
2016-11-07 16:14     ` Shuah Khan
2016-11-07 15:41 ` [PATCH] net/netfilter: Fix use uninitialized warn in nft_range_eval() Shuah Khan
2016-11-08 23:13   ` Pablo Neira Ayuso

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).