openvswitch: Change ENOENT return value to ENODEV in lookup_vport().
authorJarno Rajahalme <jarno.rajahalme@nsn.com>
Wed, 9 Jan 2013 22:27:35 +0000 (14:27 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 9 Jan 2013 22:27:35 +0000 (14:27 -0800)
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 <jarno.rajahalme@nsn.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
net/openvswitch/datapath.c

index f996db343247aab3b155a27df330252de35761db..f9d2438e64372d717133fcdda45ea33924973ff3 100644 (file)
@@ -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);