datapath: Fix ovs_vport_cmd_del return value on success
authorRich Lane <rlane@bigswitch.com>
Fri, 8 Feb 2013 17:11:28 +0000 (09:11 -0800)
committerJesse Gross <jesse@nicira.com>
Fri, 8 Feb 2013 17:25:33 +0000 (09:25 -0800)
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>
datapath/datapath.c

index a4ecfa5..48ad116 100644 (file)
@@ -2198,6 +2198,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,