diff options
Diffstat (limited to 'sound/drivers/mpu401/mpu401.c')
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 9ea3059a7064..da7ef26995c3 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c | |||
@@ -251,10 +251,8 @@ static int __init alsa_card_mpu401_init(void) | |||
251 | #endif | 251 | #endif |
252 | device = platform_device_register_simple(SND_MPU401_DRIVER, | 252 | device = platform_device_register_simple(SND_MPU401_DRIVER, |
253 | i, NULL, 0); | 253 | i, NULL, 0); |
254 | if (IS_ERR(device)) { | 254 | if (IS_ERR(device)) |
255 | err = PTR_ERR(device); | 255 | continue; |
256 | goto errout; | ||
257 | } | ||
258 | platform_devices[i] = device; | 256 | platform_devices[i] = device; |
259 | snd_mpu401_devices++; | 257 | snd_mpu401_devices++; |
260 | } | 258 | } |
@@ -266,14 +264,10 @@ static int __init alsa_card_mpu401_init(void) | |||
266 | #ifdef MODULE | 264 | #ifdef MODULE |
267 | printk(KERN_ERR "MPU-401 device not found or device busy\n"); | 265 | printk(KERN_ERR "MPU-401 device not found or device busy\n"); |
268 | #endif | 266 | #endif |
269 | err = -ENODEV; | 267 | snd_mpu401_unregister_all(); |
270 | goto errout; | 268 | return -ENODEV; |
271 | } | 269 | } |
272 | return 0; | 270 | return 0; |
273 | |||
274 | errout: | ||
275 | snd_mpu401_unregister_all(); | ||
276 | return err; | ||
277 | } | 271 | } |
278 | 272 | ||
279 | static void __exit alsa_card_mpu401_exit(void) | 273 | static void __exit alsa_card_mpu401_exit(void) |