diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
| commit | 4741c336d27dec3ea68a35659abb8dc82b142388 (patch) | |
| tree | a8576df82129354b77b0144c480c446ec7aba7b2 /sound/isa/adlib.c | |
| parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
| parent | a9a5cd5d2a57fb76dbae2115450f777b69beccf7 (diff) | |
Merge branch 'master'
Diffstat (limited to 'sound/isa/adlib.c')
| -rw-r--r-- | sound/isa/adlib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c index a253a14e6a45..1124344ed948 100644 --- a/sound/isa/adlib.c +++ b/sound/isa/adlib.c | |||
| @@ -43,8 +43,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device) | |||
| 43 | struct snd_card *card; | 43 | struct snd_card *card; |
| 44 | struct snd_opl3 *opl3; | 44 | struct snd_opl3 *opl3; |
| 45 | 45 | ||
| 46 | int error; | 46 | int error, i = device->id; |
| 47 | int i = device->id; | ||
| 48 | 47 | ||
| 49 | if (port[i] == SNDRV_AUTO_PORT) { | 48 | if (port[i] == SNDRV_AUTO_PORT) { |
| 50 | snd_printk(KERN_ERR DRV_NAME ": please specify port\n"); | 49 | snd_printk(KERN_ERR DRV_NAME ": please specify port\n"); |
| @@ -95,8 +94,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device) | |||
| 95 | return 0; | 94 | return 0; |
| 96 | 95 | ||
| 97 | out1: snd_card_free(card); | 96 | out1: snd_card_free(card); |
| 98 | out0: error = -EINVAL; /* FIXME: should be the original error code */ | 97 | out0: return error; |
| 99 | return error; | ||
| 100 | } | 98 | } |
| 101 | 99 | ||
| 102 | static int __devexit snd_adlib_remove(struct platform_device *device) | 100 | static int __devexit snd_adlib_remove(struct platform_device *device) |
| @@ -134,6 +132,11 @@ static int __init alsa_card_adlib_init(void) | |||
| 134 | if (IS_ERR(device)) | 132 | if (IS_ERR(device)) |
| 135 | continue; | 133 | continue; |
| 136 | 134 | ||
| 135 | if (!platform_get_drvdata(device)) { | ||
| 136 | platform_device_unregister(device); | ||
| 137 | continue; | ||
| 138 | } | ||
| 139 | |||
| 137 | devices[i] = device; | 140 | devices[i] = device; |
| 138 | cards++; | 141 | cards++; |
| 139 | } | 142 | } |
