From 17535c57bf1a0fd1b298ba54adb8831fc99e667c Mon Sep 17 00:00:00 2001 From: Jarno Rajahalme Date: Tue, 8 Jan 2013 13:41:00 +0200 Subject: [PATCH] datapath: Change ENOENT return value to ENODEV in lookup_vport(). This reduces the number of valid "no such device" error values that need special attention by the caller. Userspace code will need to keep on checking for both ENODEV and ENOENT as long as older kernel modules are around. Signed-off-by: Jarno Rajahalme Signed-off-by: Jesse Gross --- datapath/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 30e26a770..14c5c540c 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1679,7 +1679,7 @@ static struct vport *lookup_vport(struct net *net, vport = ovs_vport_rtnl_rcu(dp, port_no); if (!vport) - return ERR_PTR(-ENOENT); + return ERR_PTR(-ENODEV); return vport; } else return ERR_PTR(-EINVAL); -- 2.47.0