summaryrefslogtreecommitdiff
path: root/fs/ubifs/ubifs.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-11-08 22:28:47 +0100
committerHeiko Schocher <hs@denx.de>2017-11-20 10:13:33 +0100
commit4b29975fd0f25256d8e643076a2c4c5f9de00f8f (patch)
treea2025ff4b62d83c6eec5a64eeb7b19e3555a1a7e /fs/ubifs/ubifs.c
parentb6251db8c3f0de605b4cd6f15a00fc7dd19cda63 (diff)
ubifs: no NULL check needed before free
kfree() calls free. free() checks if the parameter is NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'fs/ubifs/ubifs.c')
-rw-r--r--fs/ubifs/ubifs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 8f1c9d167d..4465523d5f 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -462,14 +462,10 @@ out:
dbg_gen("cannot find next direntry, error %d", err);
out_free:
- if (file->private_data)
- kfree(file->private_data);
- if (file)
- free(file);
- if (dentry)
- free(dentry);
- if (dir)
- free(dir);
+ kfree(file->private_data);
+ free(file);
+ free(dentry);
+ free(dir);
return ret;
}