diff options
Diffstat (limited to 'drivers/media/IR/ir-keytable.c')
-rw-r--r-- | drivers/media/IR/ir-keytable.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 9374a006f43d..94a8577e72eb 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c | |||
@@ -490,11 +490,12 @@ int __ir_input_register(struct input_dev *input_dev, | |||
490 | if (rc < 0) | 490 | if (rc < 0) |
491 | goto out_table; | 491 | goto out_table; |
492 | 492 | ||
493 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) { | 493 | if (ir_dev->props) |
494 | rc = ir_raw_event_register(input_dev); | 494 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) { |
495 | if (rc < 0) | 495 | rc = ir_raw_event_register(input_dev); |
496 | goto out_event; | 496 | if (rc < 0) |
497 | } | 497 | goto out_event; |
498 | } | ||
498 | 499 | ||
499 | IR_dprintk(1, "Registered input device on %s for %s remote.\n", | 500 | IR_dprintk(1, "Registered input device on %s for %s remote.\n", |
500 | driver_name, rc_tab->name); | 501 | driver_name, rc_tab->name); |
@@ -530,8 +531,10 @@ void ir_input_unregister(struct input_dev *input_dev) | |||
530 | IR_dprintk(1, "Freed keycode table\n"); | 531 | IR_dprintk(1, "Freed keycode table\n"); |
531 | 532 | ||
532 | del_timer_sync(&ir_dev->timer_keyup); | 533 | del_timer_sync(&ir_dev->timer_keyup); |
533 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) | 534 | if (ir_dev->props) |
534 | ir_raw_event_unregister(input_dev); | 535 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) |
536 | ir_raw_event_unregister(input_dev); | ||
537 | |||
535 | rc_tab = &ir_dev->rc_tab; | 538 | rc_tab = &ir_dev->rc_tab; |
536 | rc_tab->size = 0; | 539 | rc_tab->size = 0; |
537 | kfree(rc_tab->scan); | 540 | kfree(rc_tab->scan); |