diff options
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 93015f85d4a6..b1c27e28859b 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
@@ -821,8 +821,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
821 | do { | 821 | do { |
822 | rc = zcrypt_rsa_modexpo(&mex); | 822 | rc = zcrypt_rsa_modexpo(&mex); |
823 | } while (rc == -EAGAIN); | 823 | } while (rc == -EAGAIN); |
824 | if (rc) | 824 | if (rc) { |
825 | ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSAMODEXPO rc=%d", rc); | ||
825 | return rc; | 826 | return rc; |
827 | } | ||
826 | return put_user(mex.outputdatalength, &umex->outputdatalength); | 828 | return put_user(mex.outputdatalength, &umex->outputdatalength); |
827 | } | 829 | } |
828 | case ICARSACRT: { | 830 | case ICARSACRT: { |
@@ -838,8 +840,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
838 | do { | 840 | do { |
839 | rc = zcrypt_rsa_crt(&crt); | 841 | rc = zcrypt_rsa_crt(&crt); |
840 | } while (rc == -EAGAIN); | 842 | } while (rc == -EAGAIN); |
841 | if (rc) | 843 | if (rc) { |
844 | ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSACRT rc=%d", rc); | ||
842 | return rc; | 845 | return rc; |
846 | } | ||
843 | return put_user(crt.outputdatalength, &ucrt->outputdatalength); | 847 | return put_user(crt.outputdatalength, &ucrt->outputdatalength); |
844 | } | 848 | } |
845 | case ZSECSENDCPRB: { | 849 | case ZSECSENDCPRB: { |
@@ -855,6 +859,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
855 | do { | 859 | do { |
856 | rc = zcrypt_send_cprb(&xcRB); | 860 | rc = zcrypt_send_cprb(&xcRB); |
857 | } while (rc == -EAGAIN); | 861 | } while (rc == -EAGAIN); |
862 | if (rc) | ||
863 | ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDCPRB rc=%d", rc); | ||
858 | if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB))) | 864 | if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB))) |
859 | return -EFAULT; | 865 | return -EFAULT; |
860 | return rc; | 866 | return rc; |
@@ -872,6 +878,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, | |||
872 | do { | 878 | do { |
873 | rc = zcrypt_send_ep11_cprb(&xcrb); | 879 | rc = zcrypt_send_ep11_cprb(&xcrb); |
874 | } while (rc == -EAGAIN); | 880 | } while (rc == -EAGAIN); |
881 | if (rc) | ||
882 | ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDEP11CPRB rc=%d", rc); | ||
875 | if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb))) | 883 | if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb))) |
876 | return -EFAULT; | 884 | return -EFAULT; |
877 | return rc; | 885 | return rc; |