Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / sound / drivers / dummy.c
index ae0df54..ffeafaf 100644 (file)
@@ -677,6 +677,10 @@ static int __init alsa_card_dummy_init(void)
                                                         i, NULL, 0);
                if (IS_ERR(device))
                        continue;
+               if (!platform_get_drvdata(device)) {
+                       platform_device_unregister(device);
+                       continue;
+               }
                devices[i] = device;
                cards++;
        }