[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
@@ -1006,7 +1006,7 @@ static int __init hvc_iucv_alloc(int id, unsigned int is_console)
|
||||
priv->dev->release = (void (*)(struct device *)) kfree;
|
||||
rc = device_register(priv->dev);
|
||||
if (rc) {
|
||||
kfree(priv->dev);
|
||||
put_device(priv->dev);
|
||||
goto out_error_dev;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user