Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1835140pxx; Fri, 30 Oct 2020 23:03:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6/3cL+Sbehq208wxNEhcI9AR8K4gBWnTI8u/5BErfP5QJELJUCTfHPnk87H+V7exzNiyU X-Received: by 2002:a17:906:3a49:: with SMTP id a9mr6108225ejf.95.1604124236714; Fri, 30 Oct 2020 23:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604124236; cv=none; d=google.com; s=arc-20160816; b=LAScypO77ciV24Rg1pS4TcNw3AOUbDoVR4gHoE5Ja4a/yGu9O2RgphekW922FBKqZP X3evq8PyTfHq4cgY4EaENPLMkGGJurTpacoR0frv5FqmWj/27ARvgAxTvdL6Sk5rkTEg 0fI40963HnHm4VXGoLIVkAEQbxihOdHGE7RyJx1QaUL1yZAmNhSl0NnxCPimwLTF3vJc NtMJWSTfrz1mk1UQNAB3SH49r3dFFV4LDFyQZlv3bOXqONq4LBONkxbtNHSqK5OhZ9jO TGiwqXNSBLRA3REnvkpDOM2PdSqdy6Ccmr2HPGWqaawrmm1oiY+xhqJx+eWcyFjptTX1 lzMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=aV0nSOzKnJXPj63tG/P0MiYlW09WpXURYUJ//UDKKBk=; b=daseHhHe8qfGqMosDLb8juxyDfZOJytmvNptEWopRM6Hi/iiRUgsfifi/Ta7A4qBs5 CmU0SGfDA1EKbODB8yFRCW03s5edxQ7m8/ras9o0/v3iQWvqO77yoeIcXWZY5dUxKXfN L0R9kkEFCLUqmJRMyx0wTWdDdvMZwfLqa7QATg2wJ6o0e88F/wO+PgMuE1i601cDqU5l YnR86aB80uKbe4ciySvLG26QPEa1WaYe9WNJ2Da/piNuxIM5kyTTceqkFUlkqi7pYUUO w05S4kaL90fWjdtwAz2XV0ANck9nLpTZ4rYGjEtJ3NpPwegbb0HK7FHafXpJgo2gtlb5 dURA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec23si5958729ejb.575.2020.10.30.23.03.34; Fri, 30 Oct 2020 23:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbgJaGCE (ORCPT + 99 others); Sat, 31 Oct 2020 02:02:04 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7121 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbgJaGCD (ORCPT ); Sat, 31 Oct 2020 02:02:03 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CNT8m5wmlzLrxZ; Sat, 31 Oct 2020 14:02:00 +0800 (CST) Received: from localhost (10.174.176.180) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Sat, 31 Oct 2020 14:01:55 +0800 From: YueHaibing To: , , , CC: , , , YueHaibing Subject: [PATCH net-next] openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL Date: Sat, 31 Oct 2020 14:01:53 +0800 Message-ID: <20201031060153.39912-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.176.180] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix smatch warning: net/openvswitch/meter.c:427 ovs_meter_cmd_set() warn: passing zero to 'PTR_ERR' dp_meter_create() never returns NULL, use IS_ERR instead of IS_ERR_OR_NULL to fix this. Signed-off-by: YueHaibing --- net/openvswitch/meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index 8fbefd52af7f..15424d26e85d 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -423,7 +423,7 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info) return -EINVAL; meter = dp_meter_create(a); - if (IS_ERR_OR_NULL(meter)) + if (IS_ERR(meter)) return PTR_ERR(meter); reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_SET, -- 2.17.1