aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dm1105/dm1105.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dm1105/dm1105.c')
-rw-r--r--drivers/media/dvb/dm1105/dm1105.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index 4c28632f94c4..53e3f2a7d31a 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -589,7 +589,12 @@ int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
589 snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), 589 snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys),
590 "pci-%s/ir0", pci_name(dm1105->pdev)); 590 "pci-%s/ir0", pci_name(dm1105->pdev));
591 591
592 ir_input_init(input_dev, &dm1105->ir.ir, ir_type, ir_codes); 592 err = ir_input_init(input_dev, &dm1105->ir.ir, ir_type, ir_codes);
593 if (err < 0) {
594 input_free_device(input_dev);
595 return err;
596 }
597
593 input_dev->name = "DVB on-card IR receiver"; 598 input_dev->name = "DVB on-card IR receiver";
594 input_dev->phys = dm1105->ir.input_phys; 599 input_dev->phys = dm1105->ir.input_phys;
595 input_dev->id.bustype = BUS_PCI; 600 input_dev->id.bustype = BUS_PCI;
@@ -608,6 +613,7 @@ int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
608 613
609 err = input_register_device(input_dev); 614 err = input_register_device(input_dev);
610 if (err) { 615 if (err) {
616 ir_input_free(input_dev);
611 input_free_device(input_dev); 617 input_free_device(input_dev);
612 return err; 618 return err;
613 } 619 }
@@ -617,8 +623,8 @@ int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
617 623
618void __devexit dm1105_ir_exit(struct dm1105dvb *dm1105) 624void __devexit dm1105_ir_exit(struct dm1105dvb *dm1105)
619{ 625{
626 ir_input_free(dm1105->ir.input_dev);
620 input_unregister_device(dm1105->ir.input_dev); 627 input_unregister_device(dm1105->ir.input_dev);
621
622} 628}
623 629
624static int __devinit dm1105dvb_hw_init(struct dm1105dvb *dm1105dvb) 630static int __devinit dm1105dvb_hw_init(struct dm1105dvb *dm1105dvb)