]> git.sur5r.net Git - u-boot/blobdiff - fs/yaffs2/yaffsfs.c
configs: dragonboard410c: remove env partition offset
[u-boot] / fs / yaffs2 / yaffsfs.c
index 41e5f0108cf177a6aff51479da2360388bc01892..47abc6bedae7bf85c7eaea34dfdf1705065f297b 100644 (file)
@@ -2847,12 +2847,9 @@ static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj)
         * the next one to prevent a hanging ptr.
         */
        list_for_each(i, &search_contexts) {
-               if (i) {
-                       dsc = list_entry(i, struct yaffsfs_DirSearchContxt,
-                                        others);
-                       if (dsc->nextReturn == obj)
-                               yaffsfs_DirAdvance(dsc);
-               }
+               dsc = list_entry(i, struct yaffsfs_DirSearchContxt, others);
+               if (dsc->nextReturn == obj)
+                       yaffsfs_DirAdvance(dsc);
        }
 
 }
@@ -3018,7 +3015,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;