[ovs-dev] [PATCH] datapath: Fix ovs_vport_cmd_del return value on success

Rich Lane rich.lane at bigswitch.com
Fri Feb 8 17:11:28 UTC 2013


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 at bigswitch.com>
---
 datapath/datapath.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 86ceb9f..f78c232 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -2064,6 +2064,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,
-- 
1.7.9.5




More information about the dev mailing list