* [PATCH] amd-xgbe: Fix error path in xgbe_mod_init()
@ 2019-08-29 2:46 YueHaibing
2019-08-29 17:52 ` Jakub Kicinski
2019-08-30 21:15 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2019-08-29 2:46 UTC (permalink / raw)
To: thomas.lendacky, davem; +Cc: netdev, linux-kernel, YueHaibing
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>
---
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
index b41f236..7ce9c69 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
@@ -469,13 +469,19 @@ static int __init xgbe_mod_init(void)
ret = xgbe_platform_init();
if (ret)
- return ret;
+ goto err_platform_init;
ret = xgbe_pci_init();
if (ret)
- return ret;
+ goto err_pci_init;
return 0;
+
+err_pci_init:
+ xgbe_platform_exit();
+err_platform_init:
+ unregister_netdevice_notifier(&xgbe_netdev_notifier);
+ return ret;
}
static void __exit xgbe_mod_exit(void)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] amd-xgbe: Fix error path in xgbe_mod_init()
2019-08-29 2:46 [PATCH] amd-xgbe: Fix error path in xgbe_mod_init() YueHaibing
@ 2019-08-29 17:52 ` Jakub Kicinski
2019-08-30 1:40 ` Yuehaibing
2019-08-30 21:15 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2019-08-29 17:52 UTC (permalink / raw)
To: YueHaibing; +Cc: thomas.lendacky, davem, netdev, linux-kernel
On Thu, 29 Aug 2019 10:46:00 +0800, YueHaibing wrote:
> 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>
Looks correct.
For networking fixes please try to use [PATCH net] as a tag ([PATCH
net-next] for normal, non-fix patches).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] amd-xgbe: Fix error path in xgbe_mod_init()
2019-08-29 17:52 ` Jakub Kicinski
@ 2019-08-30 1:40 ` Yuehaibing
0 siblings, 0 replies; 4+ messages in thread
From: Yuehaibing @ 2019-08-30 1:40 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: thomas.lendacky, davem, netdev, linux-kernel
On 2019/8/30 1:52, Jakub Kicinski wrote:
> On Thu, 29 Aug 2019 10:46:00 +0800, YueHaibing wrote:
>> 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>
>
> Looks correct.
Thanks!
>
> For networking fixes please try to use [PATCH net] as a tag ([PATCH
> net-next] for normal, non-fix patches).
Ok.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] amd-xgbe: Fix error path in xgbe_mod_init()
2019-08-29 2:46 [PATCH] amd-xgbe: Fix error path in xgbe_mod_init() YueHaibing
2019-08-29 17:52 ` Jakub Kicinski
@ 2019-08-30 21:15 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-08-30 21:15 UTC (permalink / raw)
To: yuehaibing; +Cc: thomas.lendacky, netdev, linux-kernel
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 29 Aug 2019 10:46:00 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-30 21:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 2:46 [PATCH] amd-xgbe: Fix error path in xgbe_mod_init() YueHaibing
2019-08-29 17:52 ` Jakub Kicinski
2019-08-30 1:40 ` Yuehaibing
2019-08-30 21:15 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.