diff options
author | Tonghao Zhang <xiangxia.m.yue@gmail.com> | 2017-07-25 09:00:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-25 21:27:06 +0200 |
commit | 81fc9b5ccf84674ad70b1cdf29abd36397097d66 (patch) | |
tree | b9be5b1aafaec3ff800d95f0d932757ff223472f /drivers/net/appletalk | |
parent | bnxt_en: Use SWITCHDEV_SET_OPS(). (diff) | |
download | linux-81fc9b5ccf84674ad70b1cdf29abd36397097d66.tar.xz linux-81fc9b5ccf84674ad70b1cdf29abd36397097d66.zip |
drivers/net: Fix ptr_ret.cocci warnings.
we can use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
1. drivers/net/appletalk/ipddp.c
2. drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/appletalk')
-rw-r--r-- | drivers/net/appletalk/ipddp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index a306de4318d7..9375cef22420 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c @@ -311,9 +311,7 @@ module_param(ipddp_mode, int, 0); static int __init ipddp_init_module(void) { dev_ipddp = ipddp_init(); - if (IS_ERR(dev_ipddp)) - return PTR_ERR(dev_ipddp); - return 0; + return PTR_ERR_OR_ZERO(dev_ipddp); } static void __exit ipddp_cleanup_module(void) |