]> 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)
commit7973db763f7a44c28b4407023dfa2aad69df5a76
treebd138a3c79da25f6600069a24acc0d76502b47c0
parent157151680cefb96b5d3399b19ea8dc320ddc77bc
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: 990f1e173a11 ("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