* [PATCH net] vxlan: fix error return code in __vxlan_dev_create()
@ 2020-12-02 9:58 Zhang Changzhong
2020-12-03 2:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Changzhong @ 2020-12-02 9:58 UTC (permalink / raw)
To: davem, kuba, ap420073; +Cc: netdev, linux-kernel
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 0ce1822c2a08 ("vxlan: add adjacent link to limit depth level")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
drivers/net/vxlan.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 1a557ae..a506872 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3877,8 +3877,10 @@ static int __vxlan_dev_create(struct net *net, struct net_device *dev,
if (dst->remote_ifindex) {
remote_dev = __dev_get_by_index(net, dst->remote_ifindex);
- if (!remote_dev)
+ if (!remote_dev) {
+ err = -ENODEV;
goto errout;
+ }
err = netdev_upper_dev_link(remote_dev, dev, extack);
if (err)
--
2.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] vxlan: fix error return code in __vxlan_dev_create()
2020-12-02 9:58 [PATCH net] vxlan: fix error return code in __vxlan_dev_create() Zhang Changzhong
@ 2020-12-03 2:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-12-03 2:20 UTC (permalink / raw)
To: Zhang Changzhong; +Cc: davem, kuba, ap420073, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 2 Dec 2020 17:58:42 +0800 you wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 0ce1822c2a08 ("vxlan: add adjacent link to limit depth level")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
>
> [...]
Here is the summary with links:
- [net] vxlan: fix error return code in __vxlan_dev_create()
https://git.kernel.org/netdev/net/c/832e09798c26
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-03 2:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 9:58 [PATCH net] vxlan: fix error return code in __vxlan_dev_create() Zhang Changzhong
2020-12-03 2:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).