diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-02-07 07:49:55 -0800 |
---|---|---|
committer | Pravin B Shelar <pshelar@ovn.org> | 2018-02-12 22:39:19 -0800 |
commit | 720c5514a219cb11f76b4233e1f28624cc6cfbd8 (patch) | |
tree | e0f84317400b360e623c17013e30e3530de4e093 /datapath/meter.c | |
parent | 1cb5703965ef7b29cd0ce9cbdb32209fd8d3ee07 (diff) | |
download | openvswitch-720c5514a219cb11f76b4233e1f28624cc6cfbd8.tar.gz |
datapath: Fix return value check in ovs_meter_cmd_features()
Upstream commit:
commit 8a860c2bcc84a8e4fbcabb928cd97e4c51b17d93
Author: Wei Yongjun <weiyongjun1@huawei.com>
Date: Tue Nov 14 06:20:16 2017 +0000
openvswitch: Fix return value check in ovs_meter_cmd_features()
In case of error, the function ovs_meter_cmd_reply_start() returns
ERR_PTR() not NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Diffstat (limited to 'datapath/meter.c')
-rw-r--r-- | datapath/meter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/meter.c b/datapath/meter.c index 1ab965d0c..bc940aed2 100644 --- a/datapath/meter.c +++ b/datapath/meter.c @@ -166,7 +166,7 @@ static int ovs_meter_cmd_features(struct sk_buff *skb, struct genl_info *info) reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_FEATURES, &ovs_reply_header); - if (!reply) + if (IS_ERR(reply)) return PTR_ERR(reply); if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, U32_MAX) || |