2014-11-14 18:33:08

by Fabian Frédérick

[permalink] [raw]
Subject: [PATCH 1/1 net-next] openvswitch: use PTR_ERR_OR_ZERO

Signed-off-by: Fabian Frederick <[email protected]>
---
net/openvswitch/flow_netlink.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index c0d066d..c8fccdd 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1425,10 +1425,8 @@ static int add_action(struct sw_flow_actions **sfa, int attrtype,
struct nlattr *a;

a = __add_action(sfa, attrtype, data, len, log);
- if (IS_ERR(a))
- return PTR_ERR(a);

- return 0;
+ return PTR_ERR_OR_ZERO(a);
}

static inline int add_nested_action_start(struct sw_flow_actions **sfa,
--
1.9.3


2014-11-14 20:39:26

by Pravin Shelar

[permalink] [raw]
Subject: Re: [PATCH 1/1 net-next] openvswitch: use PTR_ERR_OR_ZERO

On Fri, Nov 14, 2014 at 10:32 AM, Fabian Frederick <[email protected]> wrote:
> Signed-off-by: Fabian Frederick <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>

> ---
> net/openvswitch/flow_netlink.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index c0d066d..c8fccdd 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> @@ -1425,10 +1425,8 @@ static int add_action(struct sw_flow_actions **sfa, int attrtype,
> struct nlattr *a;
>
> a = __add_action(sfa, attrtype, data, len, log);
> - if (IS_ERR(a))
> - return PTR_ERR(a);
>
> - return 0;
> + return PTR_ERR_OR_ZERO(a);
> }
>
> static inline int add_nested_action_start(struct sw_flow_actions **sfa,
> --
> 1.9.3
>

2014-11-16 19:43:32

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 1/1 net-next] openvswitch: use PTR_ERR_OR_ZERO

From: Fabian Frederick <[email protected]>
Date: Fri, 14 Nov 2014 19:32:58 +0100

> Signed-off-by: Fabian Frederick <[email protected]>

Applied.