aboutsummaryrefslogtreecommitdiff
path: root/sound/isa/opl3sa2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/opl3sa2.c')
-rw-r--r--sound/isa/opl3sa2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 02ae73ea0bad..6d889052c32c 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -964,6 +964,10 @@ static int __init alsa_card_opl3sa2_init(void)
i, NULL, 0);
if (IS_ERR(device))
continue;
+ if (!platform_get_drvdata(device)) {
+ platform_device_unregister(device);
+ continue;
+ }
platform_devices[i] = device;
snd_opl3sa2_devices++;
}