[ALSA] unregister platform device again if probe was unsuccessful
Unregister the platform device again if the probe was unsuccessful. This restores the behaviour of not loading the driver on probe() failure. 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
d0ac642d76
commit
dcccdd938e
@ -1438,6 +1438,10 @@ static int __init sscape_manual_probe(void)
|
||||
i, NULL, 0);
|
||||
if (IS_ERR(device))
|
||||
continue;
|
||||
if (!platform_get_drvdata(device)) {
|
||||
platform_device_unregister(device);
|
||||
continue;
|
||||
}
|
||||
platform_devices[i] = device;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user