Skip to content
Commit b8f79dcc authored by Yuan Can's avatar Yuan Can Committed by David S. Miller
Browse files

net: net_netdev: Fix error handling in ntb_netdev_init_module()



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>
parent 46fb6512
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