[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

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