]> git.sur5r.net Git - u-boot/commitdiff
fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug)
authorWolfgang Denk <wd@denx.de>
Fri, 9 Dec 2011 11:14:22 +0000 (12:14 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 10 Dec 2011 22:08:49 +0000 (23:08 +0100)
Fix:
yaffs_guts.c: In function 'yaffs_GarbageCollectBlock':
yaffs_guts.c:2761:6: warning: variable 'retVal' set but not used
[-Wunused-but-set-variable]

Here GCC actually detected a bug.  The code was always returning OK
instead of the previously set retrun code.  Fix that.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: William Juul <wiljuul@cisco.com>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: William Juul <wiljuul@cisco.com>
fs/yaffs2/yaffs_guts.c

index f0ef8db9ee995c5f8b1729a1601a818e64717025..7390b40e011f85946c27d6d74af4509eb3e256e3 100644 (file)
@@ -2976,7 +2976,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device * dev, int block)
 
        dev->isDoingGC = 0;
 
-       return YAFFS_OK;
+       return retVal;
 }
 
 /* New garbage collector