net: defxx: Fix missing err handling in dfx_init()
authorYongqiang Liu <liuyongqiang13@huawei.com>
Wed, 7 Dec 2022 07:20:45 +0000 (07:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:18 +0000 (13:14 +0100)
commite1359bc90a49d68f9fbe43c07f78bbe88bf0e425
tree3fe8cc1b5453eedd447c1c76de8da0c9e6962536
parentc65603abc389b1a201a206a24476797c7b472761
net: defxx: Fix missing err handling in dfx_init()

[ Upstream commit ae18dcdff0f8d7e84cd3fd9f496518b5e72d185d ]

When eisa_driver_register() or tc_register_driver() failed,
the modprobe defxx would fail with some err log as follows:

 Error: Driver 'defxx' is already registered, aborting...

Fix this issue by adding err hanling in dfx_init().

Fixes: e89a2cfb7d7b5 ("[TC] defxx: TURBOchannel support")
Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/fddi/defxx.c