[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:
committed by
Martin Schwidefsky
parent
c48ff644f2
commit
c630493327
@@ -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. */
|
||||
|
Reference in New Issue
Block a user