[PATCH] input: fix uninitialized old_keycode oops in input_set_keycode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch as suggested by Kyle McMartin, in response to Red Hat bugzilla
615707, filed against a rawhide kernel carrying ir-core enabling patches
from the linuxtv staging/other tree. Fix is based on the similar logic in
input_set_keycode_big, and is confirmed by the bz reporter.

CC: Kyle McMartin <kmcmartin@xxxxxxxxxx>
Signed-off-by: Jarod Wilson <jarod@xxxxxxxxxx>
---
 drivers/input/input.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index ce5d90d..0c71977 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -900,6 +900,7 @@ int input_set_keycode(struct input_dev *dev,
 		if (retval)
 			goto out;
 
+		old_keycode = kt_entry.keycode;
 		kt_entry.keycode = keycode;
 
 		retval = dev->setkeycodebig(dev, &kt_entry);
-- 
1.7.1.1


-- 
Jarod Wilson
jarod@xxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux