mac802154: fix kbuild test robot warning
authorAlexander Aring <alex.aring@gmail.com>
Fri, 2 Jan 2015 14:49:41 +0000 (15:49 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 3 Jan 2015 00:51:51 +0000 (01:51 +0100)
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 <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/mac802154/cfg.c

index 7d31da5..5d9f68c 100644 (file)
@@ -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