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:45:46 +0000 (17:45 +0100)
commit709aa1f73d3e9e9ea16e2c4e44f2874c5d2c382c
tree67e4890af0285d8391520ecf58c795fd313f04df
parent417f2d2edf30a443189b8c6c820da991133f27cf
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