mISDN: fix misuse of put_device() in mISDN_register_device()
authorWang ShaoBo <bobo.shaobowang@huawei.com>
Thu, 10 Nov 2022 11:38:23 +0000 (19:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:35:39 +0000 (17:35 +0100)
commit44658d65f6b3118f595a1229d7eed74845a5e2ac
treefc088673036273542f945978b219a65264704ab7
parentbbd53d05c4c892080ef3b617eff4f57903acecb9
mISDN: fix misuse of put_device() in mISDN_register_device()

[ Upstream commit 2d25107e111a85c56f601a5470f1780ec054e6ac ]

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

Fixes: e7d1d4d9ac0d ("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>
drivers/isdn/mISDN/core.c