UBI: account for bitflips in both the VID header and data
authorBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 10:23:25 +0000 (02:23 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:10 +0000 (19:12 -0400)
commitcdf5f4433cfdbf2aaf3dabbeaa392326895149fe
tree7caf4bda371444dbbab1cce62cb7d8bbcf2e827c
parent1a18b9807e50c4e244df9209b3053ac740a6551d
UBI: account for bitflips in both the VID header and data

[ Upstream commit 8eef7d70f7c6772c3490f410ee2bceab3b543fa1 ]

We are completely discarding the earlier value of 'bitflips', which
could reflect a bitflip found in ubi_io_read_vid_hdr(). Let's use the
bitwise OR of header and data 'bitflip' statuses instead.

Coverity CID #1226856

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/attach.c