Skip to content

Commit

Permalink
openvswitch: Change ENOENT return value to ENODEV in lookup_vport().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarno Rajahalme authored and Jesse Gross committed Jan 9, 2013
1 parent 9807a54 commit 14408db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14408db

Please sign in to comment.