Return relevant error code when crypto session configure fails. Signed-off-by: Rajesh Mudimadugula <rmudimadu...@marvell.com> --- drivers/crypto/virtio/virtio_cryptodev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index 98415af123..ebb53cd483 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1373,6 +1373,7 @@ virtio_crypto_sym_configure_session( } break; default: + ret = -ENOTSUP; VIRTIO_CRYPTO_SESSION_LOG_ERR( "Unsupported operation chain order parameter"); goto error_out; @@ -1380,7 +1381,7 @@ virtio_crypto_sym_configure_session( return 0; error_out: - return -1; + return ret; } static void -- 2.34.1