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

Commit e8a0e412 authored by Jesper Juhl's avatar Jesper Juhl Committed by Artem Bityutskiy
Browse files

jffs2: Avoid unneeded 'if' before kfree



kfree() deals gracefully with NULL pointers, so it's pointless to test for
one prior to calling it.
This removes such a test from jffs2_scan_medium().

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
parent e638275e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -275,9 +275,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
	else
		c->mtd->unpoint(c->mtd, 0, c->mtd->size);
#endif
	if (s)
	kfree(s);

	return ret;
}