Skip to contentSkip to conversation

mac802154: fix kbuild test robot warning

PATCH In review Alexander Aring 2 participants 2 messages Jan 2, 2015 – Jan 3, 2015

Subsystems (2)
lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/1 mac802154: fix kbuild test robot warning

This patch fixs the following kbuild test robot warning:

coccinelle warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

net/mac802154/cfg.c:53:1-3: WARNING: PTR_ERR_OR_ZERO can be used

---
To return net_device here is for supporting still the deprecated functionality. When we remove the old netlink interface we will change the return type to int.

 net/mac802154/cfg.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/mac802154/cfg.c +1 -4
index 7d31da5..5d9f68c 100644
@@ -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
Signature · 1 line
2.2.1
#1 lore raw

Hi Alex,

Quoted 6 lines

This patch fixs the following kbuild test robot warning:

coccinelle warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

net/mac802154/cfg.c:53:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Quoted 7 lines

---
To return net_device here is for supporting still the deprecated functionality. When we remove the old netlink interface we will change the return type to int.

net/mac802154/cfg.c | 5 +----

1 file changed, 1 insertion(+), 4 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel