aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/mpu401
diff options
context:
space:
mode:
authorRene Herman <rene.herman@keyaccess.nl>2006-04-13 12:57:11 +0200
committerJaroslav Kysela <perex@suse.cz>2006-04-27 21:10:08 +0200
commita182ee9876c7826d0b8f7789cb5c38c5bfbec441 (patch)
tree68862b25d3e70a8c294ec248d3473e30fb2aae94 /sound/drivers/mpu401
parent5c59e09d7e51f5781439aa6f1963076568fd1f4f (diff)
downloadkernel_samsung_smdk4412-a182ee9876c7826d0b8f7789cb5c38c5bfbec441.zip
kernel_samsung_smdk4412-a182ee9876c7826d0b8f7789cb5c38c5bfbec441.tar.gz
kernel_samsung_smdk4412-a182ee9876c7826d0b8f7789cb5c38c5bfbec441.tar.bz2
[ALSA] continue on IS_ERR from platform device registration
I previously only concerned myself with sound/isa. When I now checked for more platform_device_register_simple() usages in ALSA I found a couple more drivers that needed the same patches as already submitted for all the ISA drivers. This first one is the continue-on-iserr patch for sound/drivers. This gets them all. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/mpu401')
-rw-r--r--sound/drivers/mpu401/mpu401.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 9ea3059..da7ef26 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)
#endif
device = platform_device_register_simple(SND_MPU401_DRIVER,
i, NULL, 0);
- if (IS_ERR(device)) {
- err = PTR_ERR(device);
- goto errout;
- }
+ if (IS_ERR(device))
+ continue;
platform_devices[i] = device;
snd_mpu401_devices++;
}
@@ -266,14 +264,10 @@ static int __init alsa_card_mpu401_init(void)
#ifdef MODULE
printk(KERN_ERR "MPU-401 device not found or device busy\n");
#endif
- err = -ENODEV;
- goto errout;
+ snd_mpu401_unregister_all();
+ return -ENODEV;
}
return 0;
-
- errout:
- snd_mpu401_unregister_all();
- return err;
}
static void __exit alsa_card_mpu401_exit(void)