diff options
author | Dave Jones <davej@redhat.com> | 2006-04-18 17:19:55 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-04-18 17:19:55 -0500 |
commit | f1f76afd71e0f17af9a35fcb649f4bab53304a4d (patch) | |
tree | a56257b13a0eda4a9b7e950c3b85adad16341b80 /sound/isa/opl3sa2.c | |
parent | 530515a06f90c0831732709efee4a99497bd2b7c (diff) | |
parent | 385910f2b275a636238f70844f1b6da9fda6f2da (diff) | |
download | linux-rt-f1f76afd71e0f17af9a35fcb649f4bab53304a4d.tar.gz |
Merge ../linus
Diffstat (limited to 'sound/isa/opl3sa2.c')
-rw-r--r-- | sound/isa/opl3sa2.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index c906e205d7d5..6d889052c32c 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c @@ -962,9 +962,11 @@ static int __init alsa_card_opl3sa2_init(void) #endif device = platform_device_register_simple(OPL3SA2_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; snd_opl3sa2_devices++; @@ -983,14 +985,10 @@ static int __init alsa_card_opl3sa2_init(void) #ifdef MODULE snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_opl3sa2_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_opl3sa2_unregister_all(); - return err; } static void __exit alsa_card_opl3sa2_exit(void) |