]> git.ipfire.org Git - thirdparty/qemu.git/commit
backends/cryptodev: Do not ignore throttle/backends Errors
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 20 Nov 2023 14:54:16 +0000 (15:54 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 20 Jan 2024 10:00:20 +0000 (13:00 +0300)
commita8988972cd2c724019bbf409f3375eb0f958d020
treeac7967152d24cc119638de269504cf3aeb6d6d76
parent7b03b125ee36d0e98f12c80ca8a85d9597a7dc0e
backends/cryptodev: Do not ignore throttle/backends Errors

Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init()
can set their Error** argument. Do not ignore them, return early
on failure. Without that, running into another failure trips
error_setv()'s assertion. Use the ERRP_GUARD() macro as suggested
in commit ae7c80a7bd ("error: New macro ERRP_GUARD()").

Cc: qemu-stable@nongnu.org
Fixes: e7a775fd9f ("cryptodev: Account statistics")
Fixes: 2580b452ff ("cryptodev: support QoS")
Reviewed-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231120150418.93443-1-philmd@linaro.org>
(cherry picked from commit 484aecf2d3a75251b63481be2a0c3aef635002af)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
backends/cryptodev.c