From: Jarno Rajahalme Date: Wed, 9 Jan 2013 22:27:35 +0000 (-0800) Subject: openvswitch: Change ENOENT return value to ENODEV in lookup_vport(). X-Git-Tag: v3.10-rc1~120^2~435^2~1 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/14408dba8440ef629a3a2827bc4c7b5045889295 openvswitch: 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 --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index f996db343247..f9d2438e6437 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1628,7 +1628,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);