amd-xgbe: Fix error path in xgbe_mod_init()
authorYueHaibing <yuehaibing@huawei.com>
Thu, 29 Aug 2019 02:46:00 +0000 (10:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2019 21:15:31 +0000 (14:15 -0700)
commitb6b4dc4c1fa7f1c99398e7dc85758049645e9588
tree0be444946d219364420a89a6b53b62be78a38774
parent8693265329560af4d1190aaa195ad767a05ceeab
amd-xgbe: Fix error path in xgbe_mod_init()

In xgbe_mod_init(), we should do cleanup if some error occurs

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: efbaa828330a ("amd-xgbe: Add support to handle device renaming")
Fixes: 47f164deab22 ("amd-xgbe: Add PCI device support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-main.c