aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_msgtype50.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/s390/crypto/zcrypt_msgtype50.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_msgtype50.c b/drivers/s390/crypto/zcrypt_msgtype50.c
index 7aedc338b445..349306c2f155 100644
--- a/drivers/s390/crypto/zcrypt_msgtype50.c
+++ b/drivers/s390/crypto/zcrypt_msgtype50.c
@@ -471,7 +471,9 @@ static long zcrypt_cex2a_modexpo(struct zcrypt_queue *zq,
if (rc)
goto out_free;
init_completion(&work);
- ap_queue_message(zq->queue, &ap_msg);
+ rc = ap_queue_message(zq->queue, &ap_msg);
+ if (rc)
+ goto out_free;
rc = wait_for_completion_interruptible(&work);
if (rc == 0) {
rc = ap_msg.rc;
@@ -515,7 +517,9 @@ static long zcrypt_cex2a_modexpo_crt(struct zcrypt_queue *zq,
if (rc)
goto out_free;
init_completion(&work);
- ap_queue_message(zq->queue, &ap_msg);
+ rc = ap_queue_message(zq->queue, &ap_msg);
+ if (rc)
+ goto out_free;
rc = wait_for_completion_interruptible(&work);
if (rc == 0) {
rc = ap_msg.rc;