diff options
Diffstat (limited to 'sound/drivers/virmidi.c')
-rw-r--r-- | sound/drivers/virmidi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index 26eb2499d442..59171f8200df 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c | |||
@@ -171,6 +171,10 @@ static int __init alsa_card_virmidi_init(void) | |||
171 | i, NULL, 0); | 171 | i, NULL, 0); |
172 | if (IS_ERR(device)) | 172 | if (IS_ERR(device)) |
173 | continue; | 173 | continue; |
174 | if (!platform_get_drvdata(device)) { | ||
175 | platform_device_unregister(device); | ||
176 | continue; | ||
177 | } | ||
174 | devices[i] = device; | 178 | devices[i] = device; |
175 | cards++; | 179 | cards++; |
176 | } | 180 | } |