瀏覽代碼

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 <wd@denx.de>
Cc: William Juul <wiljuul@cisco.com>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: William Juul <wiljuul@cisco.com>
Wolfgang Denk 13 年之前
父節點
當前提交
5c2db13a2a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/yaffs2/yaffs_guts.c

+ 1 - 1
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