forked from luck/tmp_suning_uos_patched
ubi: wl: Silence uninitialized variable warning
This condition needs to be fipped around because "err" is uninitialized
when "force" is set. The Smatch static analysis tool complains and
UBsan will also complain at runtime.
Fixes: 663586c0a8
("ubi: Expose the bitrot interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
2fe8b2d557
commit
5578e48e5c
|
@ -1517,7 +1517,7 @@ int ubi_bitflip_check(struct ubi_device *ubi, int pnum, int force)
|
|||
mutex_unlock(&ubi->buf_mutex);
|
||||
}
|
||||
|
||||
if (err == UBI_IO_BITFLIPS || force) {
|
||||
if (force || err == UBI_IO_BITFLIPS) {
|
||||
/*
|
||||
* Okay, bit flip happened, let's figure out what we can do.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user