From patchwork Fri Mar 15 00:15:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Gross X-Patchwork-Id: 227832 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 501C42C00A3 for ; Fri, 15 Mar 2013 11:15:30 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108Ab3COAP0 (ORCPT ); Thu, 14 Mar 2013 20:15:26 -0400 Received: from na3sys009aog124.obsmtp.com ([74.125.149.151]:42606 "HELO na3sys009aog124.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751574Ab3COAPP (ORCPT ); Thu, 14 Mar 2013 20:15:15 -0400 Received: from mail-qe0-f70.google.com ([209.85.128.70]) (using TLSv1) by na3sys009aob124.postini.com ([74.125.148.12]) with SMTP ID DSNKUUJoEkcitUCqWu4GZSlyLrx5/TvWOvMa@postini.com; Thu, 14 Mar 2013 17:15:15 PDT Received: by mail-qe0-f70.google.com with SMTP id a11so4808999qen.9 for ; Thu, 14 Mar 2013 17:15:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=LAYv37TBNv1duvLuh5CaPEFRdTN+gBuAgvJ3vMaN1u0=; b=RfanWO/X9wqcdTxm+elivBlw1zjXTc2LrWKltTwFg5SVsw58FkS95+7u4htzG3G6hj 7U9Cx5sUWTc2QoFyM6IvF2MFvzkbs2RpuA6z+kSahYVYm1+MW/VRLBA/IiEBoTHRE4+m P+IVE/qII15bD8SkqSshc/g4xmew86Wv8VcnrMwSaDiP//+pnm67+nvUi2R2MloRh25l /kRnCoP/qELljRWtWvb2j5m510eRHbJzfGZjWl0057bZRyFnBdPxd6axX66/5/n9IU86 ThBEYAwQdIpCsRP5Rp8mB3+D4GhQFYrpV3TUyGkNFWP0XdLZCLO40qieQIZXliBJ/VGC hduw== X-Received: by 10.236.148.164 with SMTP id v24mr5975478yhj.116.1363306513822; Thu, 14 Mar 2013 17:15:13 -0700 (PDT) X-Received: by 10.236.148.164 with SMTP id v24mr5975466yhj.116.1363306513731; Thu, 14 Mar 2013 17:15:13 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.14]) by mx.google.com with ESMTPS id b62sm8135309yhf.13.2013.03.14.17.15.12 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Mar 2013 17:15:13 -0700 (PDT) From: Jesse Gross To: David Miller Cc: netdev@vger.kernel.org, dev@openvswitch.org, Rich Lane , Jesse Gross Subject: [PATCH net 2/6] openvswitch: Fix ovs_vport_cmd_new return value on success Date: Thu, 14 Mar 2013 17:15:02 -0700 Message-Id: <1363306506-885-3-git-send-email-jesse@nicira.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363306506-885-1-git-send-email-jesse@nicira.com> References: <1363306506-885-1-git-send-email-jesse@nicira.com> X-Gm-Message-State: ALoCoQnhC+r5+YdLCrDBBd75V6DmOg8a4ofmc7/4hadgRs5p2kVD0BHSLu9tuwUe7Cjh/XZB8smj1GoXf/63xjv8y1niqEufSsqECIsTrEa9Z317sSSHR6Pz8VLpr2xEoBUHqYxOTVYmr9w1IYzLjSGvolD5TmW6L4AjBvtMUhZxPJwdjAKfwTI= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rich Lane 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 --- net/openvswitch/datapath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 5e275b9..a2cd3e6 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)) {