[S390] proper use of device register

Don't use kfree directly after device registration started.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Sebastian Ott
2009-09-11 10:28:38 +02:00
committed by Martin Schwidefsky
parent c48ff644f2
commit c630493327
8 changed files with 25 additions and 26 deletions

View File

@@ -1114,7 +1114,7 @@ static void ap_scan_bus(struct work_struct *unused)
ap_dev->device.release = ap_device_release;
rc = device_register(&ap_dev->device);
if (rc) {
kfree(ap_dev);
put_device(&ap_dev->device);
continue;
}
/* Add device attributes. */