diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-25 14:07:51 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 19:22:57 +0300 |
commit | 7e3176555003a45318010d9820eb5ad1abb596bf (patch) | |
tree | 7553a8e0c69ee9db1234b3523e153f3b2d655361 /drivers/md/bitmap.c | |
parent | 3cdc409c169c9f2155151eea82cb9868e4d62788 (diff) | |
download | linux-7e3176555003a45318010d9820eb5ad1abb596bf.tar.xz |
[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.c | 2 |
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; } |