UBI: initialize LEB number variable
authorBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 10:23:27 +0000 (02:23 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:10 +0000 (19:12 -0400)
commit256f3466548da7c3761e246dd5e6a0776c01df2a
tree0338a536588ddea2345d287dbcef19e710c8be1e
parentc2ffa098d6f9d427269912e33beecb00c57d9460
UBI: initialize LEB number variable

[ Upstream commit f16db8071ce18819fbd705ddcc91c6f392fb61f8 ]

In some of the 'out_not_moved' error paths, lnum may be used
uninitialized. Don't ignore the warning; let's fix it.

This uninitialized variable doesn't have much visible effect in the end,
since we just schedule the PEB for erasure, and its LEB number doesn't
really matter (it just gets printed in debug messages). But let's get it
straight anyway.

Coverity CID #113449

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/mtd/ubi/wl.c