diff mbox

[1/1,net-next] openvswitch: use PTR_ERR_OR_ZERO

Message ID 1415989978-28559-1-git-send-email-fabf@skynet.be
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Fabian Frederick Nov. 14, 2014, 6:32 p.m. UTC
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 net/openvswitch/flow_netlink.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Pravin B Shelar Nov. 14, 2014, 8:34 p.m. UTC | #1
On Fri, Nov 14, 2014 at 10:32 AM, Fabian Frederick <fabf@skynet.be> wrote:
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Pravin B Shelar <pshelar@nicira.com>

> ---
>  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
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 16, 2014, 7:43 p.m. UTC | #2
From: Fabian Frederick <fabf@skynet.be>
Date: Fri, 14 Nov 2014 19:32:58 +0100

> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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,