My static checker complains because it is not necessary to test "if (*bh)" when we just tested "if (!*bh)" on the lines before. We can remove the condition and pull everything in one indent level. Then we have another "if (unlikely(!*bh))" check and the only way that can be true is if the "if (!buffer_uptodate(*bh))" condition was true so we can combine them together. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 8313ca3..736f12e 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -80,18 +80,15 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, *bh = sb_getblk(sb, mmp_block); if (!*bh) return -ENOMEM; - if (*bh) { - get_bh(*bh); - lock_buffer(*bh); - (*bh)->b_end_io = end_buffer_read_sync; - submit_bh(READ_SYNC | REQ_META | REQ_PRIO, *bh); - wait_on_buffer(*bh); - if (!buffer_uptodate(*bh)) { - brelse(*bh); - *bh = NULL; - } - } - if (unlikely(!*bh)) { + + get_bh(*bh); + lock_buffer(*bh); + (*bh)->b_end_io = end_buffer_read_sync; + submit_bh(READ_SYNC | REQ_META | REQ_PRIO, *bh); + wait_on_buffer(*bh); + if (!buffer_uptodate(*bh)) { + brelse(*bh); + *bh = NULL; ext4_warning(sb, "Error while reading MMP block %llu", mmp_block); return -EIO; -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html