Skip to content

Commit

Permalink
[PATCH] md/bitmap.c:bitmap_mask_state(): fix inconsequent NULL checking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Mar 25, 2006
1 parent 3cdc409 commit 7e31765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e31765

Please sign in to comment.