diff options
Diffstat (limited to 'sound/isa/sscape.c')
-rw-r--r-- | sound/isa/sscape.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 48e5552d3444..d2a856f0fde2 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c | |||
@@ -1427,8 +1427,8 @@ static int __init sscape_manual_probe(void) | |||
1427 | dma[i] == SNDRV_AUTO_DMA) { | 1427 | dma[i] == SNDRV_AUTO_DMA) { |
1428 | printk(KERN_INFO | 1428 | printk(KERN_INFO |
1429 | "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); | 1429 | "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); |
1430 | ret = -ENXIO; | 1430 | sscape_unregister_all(); |
1431 | goto errout; | 1431 | return -ENXIO; |
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | /* | 1434 | /* |
@@ -1436,17 +1436,15 @@ static int __init sscape_manual_probe(void) | |||
1436 | */ | 1436 | */ |
1437 | device = platform_device_register_simple(SSCAPE_DRIVER, | 1437 | device = platform_device_register_simple(SSCAPE_DRIVER, |
1438 | i, NULL, 0); | 1438 | i, NULL, 0); |
1439 | if (IS_ERR(device)) { | 1439 | if (IS_ERR(device)) |
1440 | ret = PTR_ERR(device); | 1440 | continue; |
1441 | goto errout; | 1441 | if (!platform_get_drvdata(device)) { |
1442 | platform_device_unregister(device); | ||
1443 | continue; | ||
1442 | } | 1444 | } |
1443 | platform_devices[i] = device; | 1445 | platform_devices[i] = device; |
1444 | } | 1446 | } |
1445 | return 0; | 1447 | return 0; |
1446 | |||
1447 | errout: | ||
1448 | sscape_unregister_all(); | ||
1449 | return ret; | ||
1450 | } | 1448 | } |
1451 | 1449 | ||
1452 | static void sscape_exit(void) | 1450 | static void sscape_exit(void) |