]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: mtdswap: fix compilation warning
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 25 Mar 2011 15:10:16 +0000 (17:10 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 25 Mar 2011 15:10:16 +0000 (17:10 +0200)
commitf54a5d62f16dba762ccda1d8b999f65e3ae52e6d
treeea9bed01be0ee11ff3e6e119aa1883bad85b35f7
parent49d31f6c00152026bff50e7b6c2e8fbd9edaa7dd
mtd: mtdswap: fix compilation warning

Fix the following compilation warning:

drivers/mtd/mtdswap.c: In function ‘mtdswap_pick_gc_eblk’:
drivers/mtd/mtdswap.c:859: warning: ‘idx’ may be used uninitialized in this function
drivers/mtd/mtdswap.c:859: note: ‘idx’ was declared here

Initialize idx to -1 because this value means "no tree choosen".

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/mtdswap.c