提交 cb7c5bdf 编写于 作者: R Rich Lane 提交者: Jesse Gross

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: NRich Lane <rlane@bigswitch.com>
Signed-off-by: NJesse Gross <jesse@nicira.com>
上级 734907e8
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册