Geert Uytterhoeven 884a3b6478 UBI: Fix crash in try_recover_peb()
drivers/mtd/ubi/eba.c: In function ‘try_recover_peb’:
    drivers/mtd/ubi/eba.c:744: warning: ‘vid_hdr’ is used uninitialized in this function

The pointer vid_hdr is indeed not initialized, leading to a crash when
it is dereferenced.

Fix this by obtaining the pointer from the VID buffer, like is done
everywhere else.

Fixes: 3291b52f9ff0acc8 ("UBI: introduce the VID buffer concept")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2016-10-20 00:06:06 +02:00
..
2016-10-02 22:48:14 +02:00
2016-09-15 08:42:03 -06:00
2016-10-02 22:48:14 +02:00
2015-04-13 21:05:17 +02:00
2016-10-20 00:06:06 +02:00
2016-07-29 23:31:54 +02:00
2016-10-02 22:48:14 +02:00
2015-10-03 20:09:41 +02:00
2016-10-02 22:48:14 +02:00
2016-10-02 22:48:14 +02:00
2016-10-02 22:48:14 +02:00
2016-10-02 22:54:01 +02:00
2015-03-26 22:47:38 +01:00