[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>
This commit is contained in:
Adrian Bunk 2006-03-25 03:07:51 -08:00 коммит произвёл Linus Torvalds
Родитель 3cdc409c16
Коммит 7e31765550
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;
}