summaryrefslogtreecommitdiff
path: root/sound/isa/sscape.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/sscape.c')
-rw-r--r--sound/isa/sscape.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 3959ed694eec..9f6b58c79209 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1262,11 +1262,6 @@ static int __devinit create_sscape(const struct params *params, snd_card_t **rca
*/
sscape_write(sscape, GA_INTENA_REG, 0x80);
- if ((err = snd_card_register(card)) < 0) {
- printk(KERN_ERR "sscape: Failed to register sound card\n");
- goto _release_card;
- }
-
/*
* Initialize mixer
*/
@@ -1396,6 +1391,13 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard,
if (ret < 0)
return ret;
snd_card_set_dev(card, &pcard->card->dev);
+
+ if ((ret = snd_card_register(card)) < 0) {
+ printk(KERN_ERR "sscape: Failed to register sound card\n");
+ snd_card_free(card);
+ return ret;
+ }
+
pnp_set_card_drvdata(pcard, card);
++sscape_cards;
++idx;
@@ -1460,6 +1462,16 @@ static int __init sscape_manual_probe(struct params *params)
if (ret < 0)
return ret;
+ if ((ret = snd_card_set_generic_dev(card)) < 0) {
+ snd_card_free(card);
+ return ret;
+ }
+ if ((ret = snd_card_register(card)) < 0) {
+ printk(KERN_ERR "sscape: Failed to register sound card\n");
+ snd_card_free(card);
+ return ret;
+ }
+
sscape_card[sscape_cards] = card;
params++;
sscape_cards++;