block/crypto: Pacify Coverity after commit f853465aac

Coverity can't see that qobject_input_visitor_new_flat_confused()
returns non-null when it doesn't set @local_err.  Check the return
value instead, like all the other callers do.

Fixes: CID 1393615
Fixes: CID 1393616
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Markus Armbruster 2018-06-26 10:05:46 +02:00 committed by Kevin Wolf
parent 17e9aa3f22
commit e6af90f3fb

View File

@ -160,7 +160,7 @@ block_crypto_open_opts_init(QCryptoBlockFormat format,
ret->format = format;
v = qobject_input_visitor_new_flat_confused(opts, &local_err);
if (local_err) {
if (!v) {
goto out;
}
@ -214,7 +214,7 @@ block_crypto_create_opts_init(QCryptoBlockFormat format,
ret->format = format;
v = qobject_input_visitor_new_flat_confused(opts, &local_err);
if (local_err) {
if (!v) {
goto out;
}