[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>
This commit is contained in:
committed by
Jaroslav Kysela
parent
5c59e09d7e
commit
a182ee9876
@ -675,10 +675,8 @@ static int __init alsa_card_dummy_init(void)
|
||||
continue;
|
||||
device = platform_device_register_simple(SND_DUMMY_DRIVER,
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device)) {
|
||||
err = PTR_ERR(device);
|
||||
goto errout;
|
||||
}
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
devices[i] = device;
|
||||
cards++;
|
||||
}
|
||||
@ -686,14 +684,10 @@ static int __init alsa_card_dummy_init(void)
|
||||
#ifdef MODULE
|
||||
printk(KERN_ERR "Dummy soundcard not found or device busy\n");
|
||||
#endif
|
||||
err = -ENODEV;
|
||||
goto errout;
|
||||
snd_dummy_unregister_all();
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
||||
|
||||
errout:
|
||||
snd_dummy_unregister_all();
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit alsa_card_dummy_exit(void)
|
||||
|
Reference in New Issue
Block a user