diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-25 06:07:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:22:57 -0500 |
commit | 7e3176555003a45318010d9820eb5ad1abb596bf (patch) | |
tree | 7553a8e0c69ee9db1234b3523e153f3b2d655361 /drivers/md | |
parent | 3cdc409c169c9f2155151eea82cb9868e4d62788 (diff) |
[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')
-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, | |||
556 | unsigned long flags; | 556 | unsigned long flags; |
557 | 557 | ||
558 | spin_lock_irqsave(&bitmap->lock, flags); | 558 | spin_lock_irqsave(&bitmap->lock, flags); |
559 | if (!bitmap || !bitmap->sb_page) { /* can't set the state */ | 559 | if (!bitmap->sb_page) { /* can't set the state */ |
560 | spin_unlock_irqrestore(&bitmap->lock, flags); | 560 | spin_unlock_irqrestore(&bitmap->lock, flags); |
561 | return; | 561 | return; |
562 | } | 562 | } |