Re: [ovs-dev] [PATCH net-next] openvswitch: Fix return value check in ovs_meter_cmd_features()

2017-11-14 Thread David Miller
From: Wei Yongjun 
Date: Tue, 14 Nov 2017 06:20:16 +

> 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 

Applied.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH net-next] openvswitch: Fix return value check in ovs_meter_cmd_features()

2017-11-14 Thread Pravin Shelar
On Tue, Nov 14, 2017 at 11:50 AM, Wei Yongjun  wrote:
> 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 

Acked-by: Pravin B Shelar 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH net-next] openvswitch: Fix return value check in ovs_meter_cmd_features()

2017-11-13 Thread Wei Yongjun
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 
---
 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 2a5ba35..2e58b6c 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,
  _reply_header);
-   if (!reply)
+   if (IS_ERR(reply))
return PTR_ERR(reply);
 
if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, U32_MAX) ||

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev