Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5578e48e authored by Dan Carpenter's avatar Dan Carpenter Committed by Richard Weinberger
Browse files

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: 663586c0 ("ubi: Expose the bitrot interface")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 2fe8b2d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.
		 */