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)
committerRichard Weinberger <richard@nod.at>
Thu, 26 Mar 2015 11:07:17 +0000 (12:07 +0100)
commit8eef7d70f7c6772c3490f410ee2bceab3b543fa1
tree6a2c04d20a8e7e5b9bd3a4a8e30a80be31c6b560
parent235c362bd0f6afcf767bc72aa0c647e1434cc631
UBI: account for bitflips in both the VID header and data

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