summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-25 12:07:51 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 17:22:57 +0100
commit7e3176555003a45318010d9820eb5ad1abb596bf (patch)
tree7553a8e0c69ee9db1234b3523e153f3b2d655361 /drivers/md/bitmap.c
parent[PATCH] reiserfs/xattr_acl.c:reiserfs_get_acl(): make size an int (diff)
downloadlinux-7e3176555003a45318010d9820eb5ad1abb596bf.tar.xz
linux-7e3176555003a45318010d9820eb5ad1abb596bf.zip
[PATCH] md/bitmap.c:bitmap_mask_state(): fix inconsequent NULL checking
We dereference bitmap both one line above and one line below this check rendering this check quite useless. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Alasdair G Kergon <agk@redhat.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index eae4473eadde..670eb01a5a23 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -556,7 +556,7 @@ static void bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits,
unsigned long flags;
spin_lock_irqsave(&bitmap->lock, flags);
- if (!bitmap || !bitmap->sb_page) { /* can't set the state */
+ if (!bitmap->sb_page) { /* can't set the state */
spin_unlock_irqrestore(&bitmap->lock, flags);
return;
}