summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-08-03 23:34:16 +0200
committerDavid Teigland <teigland@redhat.com>2010-08-05 14:23:45 -0500
commitf70cb33b9c270f4f1a7f28327e7d35dbf1a6fc40 (patch)
tree92de2b2813bfcc99edff8e1eea2922227b86ca0d /fs/dlm
parenta4d935bd97b9ccf40aa0ec59646612df8ed46640 (diff)
downloadlinux-f70cb33b9c270f4f1a7f28327e7d35dbf1a6fc40.tar.gz
linux-f70cb33b9c270f4f1a7f28327e7d35dbf1a6fc40.tar.bz2
linux-f70cb33b9c270f4f1a7f28327e7d35dbf1a6fc40.zip
fs/dlm: Drop unnecessary null test
hlist_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ iterator I; expression x,E,E1,E2; statement S,S1,S2; @@ I(x,...) { <... - (x != NULL) && E ...> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index c0d35c620526..37a34c2c622a 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -248,7 +248,7 @@ static struct connection *assoc2con(int assoc_id)
for (i = 0 ; i < CONN_HASH_SIZE; i++) {
hlist_for_each_entry(con, h, &connection_hash[i], list) {
- if (con && con->sctp_assoc == assoc_id) {
+ if (con->sctp_assoc == assoc_id) {
mutex_unlock(&connections_lock);
return con;
}