[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
@@ -219,13 +219,13 @@ static int __init smsg_init(void)
|
||||
smsg_dev->driver = &smsg_driver;
|
||||
rc = device_register(smsg_dev);
|
||||
if (rc)
|
||||
goto out_free_dev;
|
||||
goto out_put;
|
||||
|
||||
cpcmd("SET SMSG IUCV", NULL, 0, NULL);
|
||||
return 0;
|
||||
|
||||
out_free_dev:
|
||||
kfree(smsg_dev);
|
||||
out_put:
|
||||
put_device(smsg_dev);
|
||||
out_free_path:
|
||||
iucv_path_free(smsg_path);
|
||||
smsg_path = NULL;
|
||||
|
Reference in New Issue
Block a user