[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:
Rene Herman
2006-04-11 14:09:37 +02:00
committed by Jaroslav Kysela
parent d0ac642d76
commit dcccdd938e
19 changed files with 81 additions and 8 deletions

View File

@ -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;