From: Wolfgang Denk Date: Fri, 9 Dec 2011 11:14:22 +0000 (+0100) Subject: fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug) X-Git-Tag: v2011.12-rc1~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c2db13a2aa4bdb2f335830f9ecbfc9ee673e53f;p=u-boot fs/yaffs2/yaffs_guts.c: Fix GCC 4.6 compile warning (and bug) 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 Cc: William Juul Cc: Scott Wood Acked-by: William Juul --- diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c index f0ef8db9ee..7390b40e01 100644 --- a/fs/yaffs2/yaffs_guts.c +++ b/fs/yaffs2/yaffs_guts.c @@ -2976,7 +2976,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device * dev, int block) dev->isDoingGC = 0; - return YAFFS_OK; + return retVal; } /* New garbage collector