projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6e1c91
)
netlink: Delete an unnecessary check before the function call "module_put"
author
Markus Elfring
<elfring@users.sourceforge.net>
Thu, 2 Jul 2015 16:38:12 +0000
(18:38 +0200)
committer
David S. Miller
<davem@davemloft.net>
Fri, 3 Jul 2015 16:27:43 +0000
(09:27 -0700)
The module_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netlink/af_netlink.c
b/net/netlink/af_netlink.c
index dea925388a5b7a86ba649f888fb10bb805f54edb..9a0ae7172f9271851f7a7c036e1c1980f45e5255 100644
(file)
--- a/
net/netlink/af_netlink.c
+++ b/
net/netlink/af_netlink.c
@@
-158,7
+158,7
@@
static int __netlink_remove_tap(struct netlink_tap *nt)
out:
spin_unlock(&netlink_tap_lock);
- if (found
&& nt->module
)
+ if (found)
module_put(nt->module);
return found ? 0 : -ENODEV;