mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
mISDN: fix misuse of put_device() in mISDN_register_device()
[ Upstream commit2d25107e11
] We should not release reference by put_device() before calling device_initialize(). Fixes:e7d1d4d9ac
("mISDN: fix possible memory leak in mISDN_register_device()") Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
07a6a8cf17
commit
596230471d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user