Commit 2d25107e authored by Wang ShaoBo's avatar Wang ShaoBo Committed by David S. Miller

mISDN: fix misuse of put_device() in mISDN_register_device()

We should not release reference by put_device() before calling device_initialize().

Fixes: e7d1d4d9 ("mISDN: fix possible memory leak in mISDN_register_device()")
Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8979f428
......@@ -222,7 +222,7 @@ mISDN_register_device(struct mISDNdevice *dev,
err = get_free_devid();
if (err < 0)
goto error1;
return err;
dev->id = err;
device_initialize(&dev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment