diff mbox

[2/2] ir-core: Fix the delete logic

Message ID 20100411002000.0ba27cdd@pedra (mailing list archive)
State Accepted
Commit 09bd00e7e12bbc9ca0ba20e0511995cddd3c93b9
Headers show

Commit Message

Mauro Carvalho Chehab April 11, 2010, 3:20 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 01bddc4..f0eb680 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -126,7 +126,7 @@  static int ir_do_setkeycode(struct input_dev *dev,
 		break;
 	}
 
-	if (old_keycode == KEY_RESERVED) {
+	if (old_keycode == KEY_RESERVED && keycode != KEY_RESERVED) {
 		/* No previous mapping found, we might need to grow the table */
 		if (ir_resize_table(rc_tab))
 			return -ENOMEM;