]> err.no Git - linux-2.6/blobdiff - sound/drivers/dummy.c
Merge git://git.infradead.org/hdrcleanup-2.6
[linux-2.6] / sound / drivers / dummy.c
index e35fd5779a9d7b9e65025df4e6622fed24390ca9..ae0df549fac7763843412746622681a1bad1d440 100644 (file)
@@ -675,10 +675,8 @@ static int __init alsa_card_dummy_init(void)
                        continue;
                device = platform_device_register_simple(SND_DUMMY_DRIVER,
                                                         i, NULL, 0);
-               if (IS_ERR(device)) {
-                       err = PTR_ERR(device);
-                       goto errout;
-               }
+               if (IS_ERR(device))
+                       continue;
                devices[i] = device;
                cards++;
        }
@@ -686,14 +684,10 @@ static int __init alsa_card_dummy_init(void)
 #ifdef MODULE
                printk(KERN_ERR "Dummy soundcard not found or device busy\n");
 #endif
-               err = -ENODEV;
-               goto errout;
+               snd_dummy_unregister_all();
+               return -ENODEV;
        }
        return 0;
-
- errout:
-       snd_dummy_unregister_all();
-       return err;
 }
 
 static void __exit alsa_card_dummy_exit(void)