* [PATCH bluetooth-next] mac802154: fix kbuild test robot warning
@ 2015-01-02 14:49 Alexander Aring
2015-01-03 0:52 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Aring @ 2015-01-02 14:49 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
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>
---
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(-)
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index 7d31da5..5d9f68c 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
--
2.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bluetooth-next] mac802154: fix kbuild test robot warning
2015-01-02 14:49 [PATCH bluetooth-next] mac802154: fix kbuild test robot warning Alexander Aring
@ 2015-01-03 0:52 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2015-01-03 0:52 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan, kernel
Hi Alex,
> 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>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-03 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-02 14:49 [PATCH bluetooth-next] mac802154: fix kbuild test robot warning Alexander Aring
2015-01-03 0:52 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.