From: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> No reason for local_err here, use errp directly instead.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Gonglei <arei.gong...@huawei.com> Message-Id: <20191205174635.18758-20-vsement...@virtuozzo.com> Signed-off-by: Markus Armbruster <arm...@redhat.com> --- backends/cryptodev.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/backends/cryptodev.c b/backends/cryptodev.c index 3c071eab95..5a9735684e 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -176,19 +176,10 @@ cryptodev_backend_complete(UserCreatable *uc, Error **errp) { CryptoDevBackend *backend = CRYPTODEV_BACKEND(uc); CryptoDevBackendClass *bc = CRYPTODEV_BACKEND_GET_CLASS(uc); - Error *local_err = NULL; if (bc->init) { - bc->init(backend, &local_err); - if (local_err) { - goto out; - } + bc->init(backend, errp); } - - return; - -out: - error_propagate(errp, local_err); } void cryptodev_backend_set_used(CryptoDevBackend *backend, bool used) -- 2.21.0