From 36cf942adf78c215f381554dfbac0ef8d05a6c21 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Fri, 2 Jan 2015 15:49:41 +0100 Subject: mac802154: fix kbuild test robot warning This patch fixs the following kbuild test robot warning: coccinelle warnings: (new ones prefixed by >>) >> net/mac802154/cfg.c:53:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- net/mac802154/cfg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'net/mac802154') diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c index 7d31da503dcf..5d9f68c75e5f 100644 --- a/net/mac802154/cfg.c +++ b/net/mac802154/cfg.c @@ -51,10 +51,7 @@ ieee802154_add_iface(struct wpan_phy *phy, const char *name, struct net_device *err; err = ieee802154_if_add(local, name, type, extended_addr); - if (IS_ERR(err)) - return PTR_ERR(err); - - return 0; + return PTR_ERR_OR_ZERO(err); } static int -- cgit v1.2.3