mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
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>
This commit is contained in:
parent
235c362bd0
commit
8eef7d70f7
1 changed files with 1 additions and 1 deletions
|
@ -410,7 +410,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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue