aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/adlib.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-04-21 12:52:36 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-04-21 12:52:36 -0400
commita748422ee45725e04e1d3792fa19dfa90ddfd116 (patch)
tree978e12895468baaa9f7ab2747b9f7d50beaf1717 /sound/isa/adlib.c
parentc63e31c2cc1ec67372920b5e1aff8204d04dd172 (diff)
parentf4ffaa452e71495a06376f12f772342bc57051fc (diff)
Merge branch 'master'
Diffstat (limited to 'sound/isa/adlib.c')
-rw-r--r--sound/isa/adlib.c11
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
97out1: snd_card_free(card); 96out1: snd_card_free(card);
98 out0: error = -EINVAL; /* FIXME: should be the original error code */ 97out0: return error;
99 return error;
100} 98}
101 99
102static int __devexit snd_adlib_remove(struct platform_device *device) 100static 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 }