vmalloc: remove redundant NULL check
Subsystems (5)
PATCH 1/1 vmalloc: remove redundant NULL check
Fix below warnings reported by coccicheck:
./fs/proc/vmcore.c:1503:2-7: WARNING: NULL check before some freeing functions is not needed.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- fs/proc/vmcore.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
fs/proc/vmcore.c +2 -5
@@ -1503,11 +1503,8 @@ int vmcore_add_device_dump(struct vmcoredd_data *data)return 0 ; out_err: -if (buf) -vfree (buf); - -if (dump) -vfree (dump); +vfree (buf); +vfree (dump);return ret; }
Signature · 7 lines
1.8.3.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 15 lines · Yang Li
Fix below warnings reported by coccicheck:
./fs/proc/vmcore.c:1503:2-7: WARNING: NULL check before some freeing functions is not needed.Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- fs/proc/vmcore.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)fs/proc/vmcore.c +0
-0
fs/proc/vmcore.c int vmcore_add_device_dump(struct vmcoredd_data *data) · line 1507
Quoted 10 lines
fs/proc/vmcore.c +2
-5@@ -1503,11 +1503,8 @@ int vmcore_add_device_dump(struct vmcoredd_data *data)return 0 ; out_err: -if (buf) -vfree (buf); - -if (dump) -vfree (dump); +vfree (buf); +vfree (dump);
Looks good, thx.
Acked-by Baoquan He <[email protected]>
Thanks
Baoquan
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec