[net,1/6] openvswitch: Fix ovs_vport_cmd_del return value on success

Message ID 1363306506-885-2-git-send-email-jesse@nicira.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jesse Gross March 15, 2013, 12:15 a.m.
From: Rich Lane <rlane@bigswitch.com>

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


diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index f996db3..5e275b9 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -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;
 	genl_notify(reply, genl_info_net(info), info->snd_portid,