aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-10-31 14:01:53 +0800
committerJakub Kicinski <kuba@kernel.org>2020-11-02 17:34:26 -0800
commit92f9e238c909ef9b4a138f47bdca856fc0c8b78a (patch)
tree5c549adb4f7fd86e55aa16041347ba4a8efdb471 /net/openvswitch
parentnet: hns3: Remove duplicated include (diff)
downloadlinux-dev-92f9e238c909ef9b4a138f47bdca856fc0c8b78a.tar.xz
linux-dev-92f9e238c909ef9b4a138f47bdca856fc0c8b78a.zip
openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL
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 <yuehaibing@huawei.com> Acked-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Link: https://lore.kernel.org/r/20201031060153.39912-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/meter.c2
1 files changed, 1 insertions, 1 deletions
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,