summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-02-16 20:22:42 +0000
committerJohannes Stezenbach <devnull@localhost>2005-02-16 20:22:42 +0000
commite62932b3e741f8f9a2f4891d59a4ee69ddea6e2c (patch)
tree1b7373b150a3ed079ed25b648458501a9e7efe81
parent74010ba624856d6dbabe1ee4d64636145b7982b1 (diff)
downloadmediapointer-dvb-s2-e62932b3e741f8f9a2f4891d59a4ee69ddea6e2c.tar.gz
mediapointer-dvb-s2-e62932b3e741f8f9a2f4891d59a4ee69ddea6e2c.tar.bz2
don't call av7110_ir_init() if driver initialization failed already
due to previous errors (resulted in Oops in out-of-memory conditions)
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index f0a23c382..17f94bd3e 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -2453,6 +2453,16 @@ err_no_mem:
av7110->dvb_adapter->priv = av7110;
frontend_init(av7110);
+#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE)
+ /* FIXME: this is a hack, just like av7110_setup_irc_config() is */
+ {
+ static int ir_initialized;
+ if (!ir_initialized) {
+ av7110_ir_init();
+ ++ir_initialized;
+ }
+ }
+#endif
printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num);
av7110->device_initialized = 1;
av7110_num++;
@@ -2640,18 +2650,6 @@ static int __init av7110_init(void)
{
int retval;
retval = saa7146_register_extension(&av7110_extension);
-#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE)
- if (retval)
- goto failed_saa7146_register;
-
- retval = av7110_ir_init();
- if (retval)
- goto failed_av7110_ir_init;
- return 0;
-failed_av7110_ir_init:
- saa7146_unregister_extension(&av7110_extension);
-failed_saa7146_register:
-#endif
return retval;
}