19.10.2020 16:06, Kevin Wolf wrote:
Am 16.10.2020 um 19:10 hat Vladimir Sementsov-Ogievskiy geschrieben:
qcow2_do_open correctly sets errp on each failure path. So, we can
simplify code in qcow2_co_invalidate_cache() and drop explicit error
propagation.

qcow2_update_options_prepare() can return -EINVAL without setting errp:

     if (s->crypt_method_header != QCOW_CRYPT_NONE && !r->crypto_opts) {
         ret = -EINVAL;
         goto fail;
     }


Actually, it's set in previous "switch", either in "default:" branch or if 
block_crypto_open_opts_init() failed.. But the code pattern is far from being obvious, I'll add a 
patch to refactor.


--
Best regards,
Vladimir

Reply via email to