diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 02:23:25 -0800 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-05-05 11:09:35 +0100 |
commit | a46c57770b946e0cbc2a4f2568cbaaaad0dc97a3 (patch) | |
tree | e469e46d3f0e1f92b83b68acd6cea87973c77e92 | |
parent | 0ce1fbc1bf8ec20af40d71d5a1eb76c250185c8b (diff) | |
download | linux-stable-a46c57770b946e0cbc2a4f2568cbaaaad0dc97a3.tar.gz linux-stable-a46c57770b946e0cbc2a4f2568cbaaaad0dc97a3.tar.bz2 linux-stable-a46c57770b946e0cbc2a4f2568cbaaaad0dc97a3.zip |
UBI: account for bitflips in both the VID header and data
commit 8eef7d70f7c6772c3490f410ee2bceab3b543fa1 upstream.
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
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
-rw-r--r-- | drivers/mtd/ubi/attach.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 6f27d9a1be3b..21841fe25ad3 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -408,7 +408,7 @@ int ubi_compare_lebs(struct ubi_device *ubi, const struct ubi_ainf_peb *aeb, second_is_newer = !second_is_newer; } else { dbg_bld("PEB %d CRC is OK", pnum); - bitflips = !!err; + bitflips |= !!err; } mutex_unlock(&ubi->buf_mutex); |