If !parent, the changed line is not reached.
So there is no need to check the value again.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 fs/yaffs2/yaffsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index 41e5f0108c..ba76a5ccdb 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -3018,7 +3018,7 @@ int yaffs_symlink(const YCHAR *oldpath, const YCHAR 
*newpath)
                yaffsfs_SetError(-ENFILE);
        else if (parent->my_dev->read_only)
                yaffsfs_SetError(-EROFS);
-       else if (parent) {
+       else {
                obj = yaffs_create_symlink(parent, name, mode, 0, 0, oldpath);
                if (obj)
                        retVal = 0;
-- 
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to