summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/broadcom
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2017-07-25 09:00:26 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-25 21:27:06 +0200
commit81fc9b5ccf84674ad70b1cdf29abd36397097d66 (patch)
treeb9be5b1aafaec3ff800d95f0d932757ff223472f /drivers/net/wireless/broadcom
parentbnxt_en: Use SWITCHDEV_SET_OPS(). (diff)
downloadlinux-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/wireless/broadcom')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
index 1447a8352383..2d3e5e263a32 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c
@@ -78,10 +78,7 @@ int brcmf_debug_attach(struct brcmf_pub *drvr)
return -ENODEV;
drvr->dbgfs_dir = debugfs_create_dir(dev_name(dev), root_folder);
- if (IS_ERR(drvr->dbgfs_dir))
- return PTR_ERR(drvr->dbgfs_dir);
-
- return 0;
+ return PTR_ERR_OR_ZERO(drvr->dbgfs_dir);
}
void brcmf_debug_detach(struct brcmf_pub *drvr)