Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e317655 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

[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: default avatarAdrian Bunk <bunk@stusta.de>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3cdc409c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}