summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Lane <rlane@bigswitch.com>2013-02-08 09:11:28 -0800
committerJesse Gross <jesse@nicira.com>2013-02-08 09:24:22 -0800
commit1ddc437b48df676163a8fe49625842625ca1db7e (patch)
tree7b4a84990155ef975dadcaabb785a9d95e5ebfa4
parent811490436a433785eed95efe5f8b7ae60a1c9671 (diff)
downloadopenvswitch-1ddc437b48df676163a8fe49625842625ca1db7e.tar.gz
datapath: Fix ovs_vport_cmd_del return value on success
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>
-rw-r--r--datapath/datapath.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/datapath/datapath.c b/datapath/datapath.c
index eb350837e..4bde93155 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1944,6 +1944,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_pid,