diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 00:25:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-24 00:25:02 -0400 |
commit | c1d9728ecc5b560465df3c0c0d3b3825c2710b40 (patch) | |
tree | d0abb5c923a7a3eca2d4b2c3e1964bf484870909 /sound/drivers/mpu401/mpu401.c | |
parent | 165415f700b0c77fa1f8db6198f48582639adf78 (diff) | |
parent | 87e807b6c461bbd449496a4c3ab78ab164a4ba97 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'sound/drivers/mpu401/mpu401.c')
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index cb36ecb78697..54e2ff9b5ca1 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c | |||
@@ -77,20 +77,26 @@ static int snd_mpu401_create(int dev, snd_card_t **rcard) | |||
77 | strcat(card->longname, "polled"); | 77 | strcat(card->longname, "polled"); |
78 | } | 78 | } |
79 | 79 | ||
80 | if (snd_mpu401_uart_new(card, 0, | 80 | if ((err = snd_mpu401_uart_new(card, 0, |
81 | MPU401_HW_MPU401, | 81 | MPU401_HW_MPU401, |
82 | port[dev], 0, | 82 | port[dev], 0, |
83 | irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) { | 83 | irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) { |
84 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); | 84 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); |
85 | snd_card_free(card); | 85 | goto _err; |
86 | return -ENODEV; | ||
87 | } | ||
88 | if ((err = snd_card_register(card)) < 0) { | ||
89 | snd_card_free(card); | ||
90 | return err; | ||
91 | } | 86 | } |
87 | |||
88 | if ((err = snd_card_set_generic_dev(card)) < 0) | ||
89 | goto _err; | ||
90 | |||
91 | if ((err = snd_card_register(card)) < 0) | ||
92 | goto _err; | ||
93 | |||
92 | *rcard = card; | 94 | *rcard = card; |
93 | return 0; | 95 | return 0; |
96 | |||
97 | _err: | ||
98 | snd_card_free(card); | ||
99 | return err; | ||
94 | } | 100 | } |
95 | 101 | ||
96 | static int __devinit snd_mpu401_probe(int dev) | 102 | static int __devinit snd_mpu401_probe(int dev) |