Skip to content
Commit ea54ea65 authored by Yuan Can's avatar Yuan Can Committed by Greg Kroah-Hartman
Browse files

net: net_netdev: Fix error handling in ntb_netdev_init_module()

[ Upstream commit b8f79dcc ]

The ntb_netdev_init_module() returns the ntb_transport_register_client()
directly without checking its return value, if
ntb_transport_register_client() failed, the NTB client device is not
unregistered.

Fix by unregister NTB client device when ntb_transport_register_client()
failed.

Fixes: 548c237c

 ("net: Add support for NTB virtual ethernet device")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 51d7f6b2
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