summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-21 10:25:45 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2014-12-01 21:35:21 -0800
commit2ed37f6c9b69092afbbf2a990336f8cbd303947d (patch)
treeea8fef3d2bf536989ae391b7e5365600b227f74b /drivers/target/iscsi
parente7b7af6e98b390c1f7d5d208d18cb7d8b7beb0f1 (diff)
downloadlinux-2ed37f6c9b69092afbbf2a990336f8cbd303947d.tar.bz2
target: Deletion of unnecessary checks 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: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target_transport.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_transport.c b/drivers/target/iscsi/iscsi_target_transport.c
index 882728fac30c..08217d62fb0d 100644
--- a/drivers/target/iscsi/iscsi_target_transport.c
+++ b/drivers/target/iscsi/iscsi_target_transport.c
@@ -26,8 +26,7 @@ struct iscsit_transport *iscsit_get_transport(int type)
void iscsit_put_transport(struct iscsit_transport *t)
{
- if (t->owner)
- module_put(t->owner);
+ module_put(t->owner);
}
int iscsit_register_transport(struct iscsit_transport *t)