From: Rich Lane Date: Fri, 8 Feb 2013 21:18:01 +0000 (-0800) Subject: openvswitch: Fix ovs_vport_cmd_new return value on success X-Git-Tag: v4.13~9926^2~18^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cb7c5bdffb727a3d4dea5247d9d1d52238b01d90;p=mirror_ubuntu-bionic-kernel.git openvswitch: Fix ovs_vport_cmd_new return value on success If the pointer does not represent an error then the PTR_ERR macro may still return a nonzero value. Signed-off-by: Rich Lane Signed-off-by: Jesse Gross --- diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 5e275b903f3c..a2cd3e6d03a2 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1691,6 +1691,7 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info) if (IS_ERR(vport)) goto exit_unlock; + err = 0; reply = ovs_vport_cmd_build_info(vport, info->snd_portid, info->snd_seq, OVS_VPORT_CMD_NEW); if (IS_ERR(reply)) {