[ALSA] continue on IS_ERR from platform device registration
Continue with the next one on error from device registration. This would seem the correct thing to do, even if it's not the probe() error that we're getting. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

کامیت شده توسط
Jaroslav Kysela

والد
12831c15f3
کامیت
d0ac642d76
@@ -209,10 +209,8 @@ static int __init alsa_card_cs4231_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(SND_CS4231_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
devices[i] = device;
|
||||
cards++;
|
||||
}
|
||||
@@ -220,14 +218,10 @@ static int __init alsa_card_cs4231_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "CS4231 soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_cs4231_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_cs4231_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_cs4231_exit(void)
|
||||
|
@@ -780,10 +780,8 @@ static int __init alsa_card_cs423x_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(CS423X_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
platform_devices[i] = device;
|
||||
snd_cs423x_devices++;
|
||||
}
|
||||
@@ -802,14 +800,10 @@ static int __init alsa_card_cs423x_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR IDENT " soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_cs423x_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_cs423x_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_cs423x_exit(void)
|
||||
|
مرجع در شماره جدید
Block a user