From: Eric Sesterhenn Since commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 we dereference a NULL pointer. Coverity id #1432. We set journal to NULL, and use it directly afterwards. Signed-off-by: Eric Sesterhenn Signed-off-by: Andrew Morton --- fs/jbd/journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN fs/jbd/journal.c~null-dereference-in-fs-jbd-journalc fs/jbd/journal.c --- a/fs/jbd/journal.c~null-dereference-in-fs-jbd-journalc +++ a/fs/jbd/journal.c @@ -725,6 +725,7 @@ journal_t * journal_init_dev(struct bloc __FUNCTION__); kfree(journal); journal = NULL; + goto out; } journal->j_dev = bdev; journal->j_fs_dev = fs_dev; @@ -735,7 +736,7 @@ journal_t * journal_init_dev(struct bloc J_ASSERT(bh != NULL); journal->j_sb_buffer = bh; journal->j_superblock = (journal_superblock_t *)bh->b_data; - +out: return journal; } _