]> git.baikalelectronics.ru Git - kernel.git/commit
ubi: wl: Silence uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 28 Feb 2019 05:35:51 +0000 (08:35 +0300)
committerRichard Weinberger <richard@nod.at>
Tue, 5 Mar 2019 20:21:07 +0000 (21:21 +0100)
commit551c4e21bfba2b805dd29882b40253441f5e162d
treebd138a3c79da25f6600069a24acc0d76502b47c0
parent5286d64b76898531be838a5c205bdce7da7479ee
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: 7c2cca9e77a1 ("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>
drivers/mtd/ubi/wl.c