Commit 379dff99 authored by Yang Yingliang's avatar Yang Yingliang Committed by Lipeng Sang
Browse files

isdn: mISDN: netjet: fix wrong check of device registration

stable inclusion
from stable-v5.10.154
commit 81204283ea138a85af380d05c8735751f7dd1242
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=81204283ea138a85af380d05c8735751f7dd1242



--------------------------------

[ Upstream commit bf00f542 ]

The class is set in mISDN_register_device(), but if device_add() returns
error, it will lead to delete a device without added, fix this by using
device_is_registered() to check if the device is registered.

Fixes: a900845e ("mISDN: Add support for Traverse Technologies NETJet PCI cards")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent b7923b71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment