Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46359295 authored by Joseph Qi's avatar Joseph Qi Committed by Linus Torvalds
Browse files

ocfs2: clean up redundant NULL checks before kfree



NULL check before kfree is redundant and so clean them up.

Signed-off-by: default avatarJoseph Qi <joseph.qi@huawei.com>
Reviewed-by: default avatarMark Fasheh <mfasheh@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7ecef14a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6178,7 +6178,7 @@ int ocfs2_begin_truncate_log_recovery(struct ocfs2_super *osb,
		iput(tl_inode);
	brelse(tl_bh);

	if (status < 0 && (*tl_copy)) {
	if (status < 0) {
		kfree(*tl_copy);
		*tl_copy = NULL;
		mlog_errno(status);
+2 −4
Original line number Diff line number Diff line
@@ -149,11 +149,9 @@ void ocfs2_free_ac_resource(struct ocfs2_alloc_context *ac)
	brelse(ac->ac_bh);
	ac->ac_bh = NULL;
	ac->ac_resv = NULL;
	if (ac->ac_find_loc_priv) {
	kfree(ac->ac_find_loc_priv);
	ac->ac_find_loc_priv = NULL;
}
}

void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac)
{