Skip to content

Commit

Permalink
openvswitch: Fix ovs_vport_cmd_del return value on success
Browse files Browse the repository at this point in the history
If the pointer does not represent an error then the PTR_ERR macro may still
return a nonzero value. The fix is the same as in ovs_vport_cmd_set.

Signed-off-by: Rich Lane <rlane@bigswitch.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
  • Loading branch information
Rich Lane authored and Jesse Gross committed Feb 23, 2013
1 parent 19f949f commit 734907e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/openvswitch/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@ static int ovs_vport_cmd_del(struct sk_buff *skb, struct genl_info *info)
if (IS_ERR(reply))
goto exit_unlock;

err = 0;
ovs_dp_detach_port(vport);

genl_notify(reply, genl_info_net(info), info->snd_portid,
Expand Down

0 comments on commit 734907e

Please sign in to comment.