OSDN Git Service

crypto: img-hash - remove need for error return variable ret
authorColin Ian King <colin.king@canonical.com>
Fri, 10 Sep 2021 12:15:32 +0000 (13:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Sep 2021 03:06:14 +0000 (11:06 +0800)
commit5e91f56a0bb32fd14096e20224bf4f93f1b174b1
treeeb4e50170f7820664b7daabddf3a9c0f0103d04e
parent29601c8159c8089782fb5da25acadd3c146f2944
crypto: img-hash - remove need for error return variable ret

The assignment to error return variable ret and then the jump to
an error exit path can be simplified by just returning the error
return at the failure point. This allows variable ret and the
error return path to be removed. This cleans up a static analysis
warninng that variable ret is being assigned (value never being
used) and being re-assigned later.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/img-hash.c