diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-07-10 15:42:49 +0900 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-07-15 17:51:22 +0200 |
commit | 0d6ef0688d8744454646298b85336407be05e309 (patch) | |
tree | 996d279032f269a843c2239795ac1558b3989fc8 /net/netfilter | |
parent | aad0d51e933f8656880592020319d2dbd09532a2 (diff) | |
download | op-kernel-dev-0d6ef0688d8744454646298b85336407be05e309.zip op-kernel-dev-0d6ef0688d8744454646298b85336407be05e309.tar.gz |
ipvs: Delete an unnecessary check before the function call "module_put"
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: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sched.c b/net/netfilter/ipvs/ip_vs_sched.c index 199760c..e50221b 100644 --- a/net/netfilter/ipvs/ip_vs_sched.c +++ b/net/netfilter/ipvs/ip_vs_sched.c @@ -137,7 +137,7 @@ struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name) void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler) { - if (scheduler && scheduler->module) + if (scheduler) module_put(scheduler->module); } |