aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcixcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcixcc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcixcc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c
index d8ad36f81540..e7a1e22e77ac 100644
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -635,13 +635,16 @@ static void zcrypt_pcixcc_receive(struct ap_device *ap_dev,
635 }; 635 };
636 struct response_type *resp_type = 636 struct response_type *resp_type =
637 (struct response_type *) msg->private; 637 (struct response_type *) msg->private;
638 struct type86x_reply *t86r = reply->message; 638 struct type86x_reply *t86r;
639 int length; 639 int length;
640 640
641 /* Copy the reply message to the request message buffer. */ 641 /* Copy the reply message to the request message buffer. */
642 if (IS_ERR(reply)) 642 if (IS_ERR(reply)) {
643 memcpy(msg->message, &error_reply, sizeof(error_reply)); 643 memcpy(msg->message, &error_reply, sizeof(error_reply));
644 else if (t86r->hdr.type == TYPE86_RSP_CODE && 644 goto out;
645 }
646 t86r = reply->message;
647 if (t86r->hdr.type == TYPE86_RSP_CODE &&
645 t86r->cprbx.cprb_ver_id == 0x02) { 648 t86r->cprbx.cprb_ver_id == 0x02) {
646 switch (resp_type->type) { 649 switch (resp_type->type) {
647 case PCIXCC_RESPONSE_TYPE_ICA: 650 case PCIXCC_RESPONSE_TYPE_ICA:
@@ -660,6 +663,7 @@ static void zcrypt_pcixcc_receive(struct ap_device *ap_dev,
660 } 663 }
661 } else 664 } else
662 memcpy(msg->message, reply->message, sizeof error_reply); 665 memcpy(msg->message, reply->message, sizeof error_reply);
666out:
663 complete(&(resp_type->work)); 667 complete(&(resp_type->work));
664} 668}
665 669