diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-28 02:23:25 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-06 21:59:16 +0200 |
commit | d7de96fe5c92a2cfd368cc857e9dc27b5ba785c8 (patch) | |
tree | 3b35ddbbcfefdf0ace9dd5e3245b98bd11189976 /drivers/mtd | |
parent | c00aa218e0a361a0b15c1cb9accd969d248978bc (diff) | |
download | lwn-d7de96fe5c92a2cfd368cc857e9dc27b5ba785c8.tar.gz lwn-d7de96fe5c92a2cfd368cc857e9dc27b5ba785c8.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd')
-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); |