'error' can be replaced by 'return -1' directly. CC: Kevin Wolf <kw...@redhat.com> CC: Max Reitz <mre...@redhat.com> CC: qemu-block@nongnu.org Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com> --- crypto/block-luks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 4861db810c..9742d4bdd9 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks.c @@ -1057,7 +1057,7 @@ qcrypto_block_luks_find_key(QCryptoBlock *block, opaque, errp); if (rv < 0) { - goto error; + return -1; } if (rv == 1) { return 0; @@ -1065,7 +1065,6 @@ qcrypto_block_luks_find_key(QCryptoBlock *block, } error_setg(errp, "Invalid password, cannot unlock any keyslot"); - error: return -1; } -- 2.24.1