diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
commit | aad61439e6a00bdb72cb649e11f6e166590c5f66 (patch) | |
tree | 2279f3c2a15f81526d14182c6acb358cafd0b359 /sound/drivers/dummy.c | |
parent | 3c304956755fa63ee80ca51ce38078fe1c4e8818 (diff) | |
parent | d98550e334715b2d9e45f8f0f4e1608720108640 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'sound/drivers/dummy.c')
-rw-r--r-- | sound/drivers/dummy.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index e35fd5779a9d..ae0df549fac7 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c | |||
@@ -675,10 +675,8 @@ static int __init alsa_card_dummy_init(void) | |||
675 | continue; | 675 | continue; |
676 | device = platform_device_register_simple(SND_DUMMY_DRIVER, | 676 | device = platform_device_register_simple(SND_DUMMY_DRIVER, |
677 | i, NULL, 0); | 677 | i, NULL, 0); |
678 | if (IS_ERR(device)) { | 678 | if (IS_ERR(device)) |
679 | err = PTR_ERR(device); | 679 | continue; |
680 | goto errout; | ||
681 | } | ||
682 | devices[i] = device; | 680 | devices[i] = device; |
683 | cards++; | 681 | cards++; |
684 | } | 682 | } |
@@ -686,14 +684,10 @@ static int __init alsa_card_dummy_init(void) | |||
686 | #ifdef MODULE | 684 | #ifdef MODULE |
687 | printk(KERN_ERR "Dummy soundcard not found or device busy\n"); | 685 | printk(KERN_ERR "Dummy soundcard not found or device busy\n"); |
688 | #endif | 686 | #endif |
689 | err = -ENODEV; | 687 | snd_dummy_unregister_all(); |
690 | goto errout; | 688 | return -ENODEV; |
691 | } | 689 | } |
692 | return 0; | 690 | return 0; |
693 | |||
694 | errout: | ||
695 | snd_dummy_unregister_all(); | ||
696 | return err; | ||
697 | } | 691 | } |
698 | 692 | ||
699 | static void __exit alsa_card_dummy_exit(void) | 693 | static void __exit alsa_card_dummy_exit(void) |