diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2017-11-14 06:20:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-14 22:02:08 +0900 |
commit | 8a860c2bcc84a8e4fbcabb928cd97e4c51b17d93 (patch) | |
tree | 992ff276cd5f1a68d7e3b8a61dd8de4cd831feed /net/openvswitch/meter.c | |
parent | 228aa0121c8897d97fd0864d4ee4851545f7ebac (diff) | |
download | linux-8a860c2bcc84a8e4fbcabb928cd97e4c51b17d93.tar.bz2 |
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>
Diffstat (limited to 'net/openvswitch/meter.c')
-rw-r--r-- | net/openvswitch/meter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index 2a5ba356c472..2e58b6c4c65f 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/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) || |