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-08-02 17:05:11 -04:00
2016-10-10 17:39:51 -07:00
2016-10-20 00:06:06 +02:00
2014-04-14 11:23:01 -07:00
2016-05-05 23:51:51 +02:00
2014-03-10 22:42:25 -07:00
2016-04-18 11:23:24 +02:00
2016-07-09 18:48:54 -07:00