projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e638275
)
jffs2: Avoid unneeded 'if' before kfree
author
Jesper Juhl
<jj@chaosbits.net>
Mon, 13 Jun 2011 20:16:44 +0000
(22:16 +0200)
committer
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:02:10 +0000
(15:02 +0300)
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: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
fs/jffs2/scan.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/jffs2/scan.c
b/fs/jffs2/scan.c
index 8d8cd3419d02a75a7b0a7336da995a430324448b..28107ca136e481a556f686376292bf2244a78a91 100644
(file)
--- a/
fs/jffs2/scan.c
+++ b/
fs/jffs2/scan.c
@@
-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);
-
+ kfree(s);
return ret;
}