yaffs2: remove redundant condition
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Sat, 15 Apr 2017 11:28:13 +0000 (13:28 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 18 Apr 2017 14:29:22 +0000 (10:29 -0400)
If !parent, the changed line is not reached.
So there is no need to check the value again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
fs/yaffs2/yaffsfs.c

index 41e5f0108cf177a6aff51479da2360388bc01892..ba76a5ccdbdb65ab9b5d6a410c81add5f919e7ef 100644 (file)
@@ -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;