summaryrefslogtreecommitdiff
path: root/fs/ext4/mmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/mmp.c')
-rw-r--r--fs/ext4/mmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index ed6548d89165..444b7016d32d 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -41,6 +41,8 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
* is not blocked in the elevator. */
if (!*bh)
*bh = sb_getblk(sb, mmp_block);
+ if (!*bh)
+ return -ENOMEM;
if (*bh) {
get_bh(*bh);
lock_buffer(*bh);