aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2014-01-29 04:00:16 +0100
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-08-30 12:11:55 -0400
commit5e7f1d4195dd96fa1e8ffa4fcd3f7038b9a4714a (patch)
tree8848476e31db669a4139f5550f0d30757e40f2a7
parent368ee449d330f455b811ebb2f2f9530fc7b49587 (diff)
downloadlinux-yocto-5e7f1d4195dd96fa1e8ffa4fcd3f7038b9a4714a.tar.gz
linux-yocto-5e7f1d4195dd96fa1e8ffa4fcd3f7038b9a4714a.tar.bz2
linux-yocto-5e7f1d4195dd96fa1e8ffa4fcd3f7038b9a4714a.zip
cryptodev: checkpatch
Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--drivers/staging/crypto/cryptodev/authenc.c6
-rw-r--r--drivers/staging/crypto/cryptodev/ioctl.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/crypto/cryptodev/authenc.c b/drivers/staging/crypto/cryptodev/authenc.c
index 80a88c1af7ed..96701f5f2a86 100644
--- a/drivers/staging/crypto/cryptodev/authenc.c
+++ b/drivers/staging/crypto/cryptodev/authenc.c
@@ -485,9 +485,8 @@ srtp_auth_n_crypt(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop,
return ret;
}
- if (unlikely(copy_to_user(caop->tag, hash_output, caop->tag_len))) {
+ if (unlikely(copy_to_user(caop->tag, hash_output, caop->tag_len)))
return -EFAULT;
- }
}
} else {
@@ -497,9 +496,8 @@ srtp_auth_n_crypt(struct csession *ses_ptr, struct kernel_crypt_auth_op *kcaop,
return -EINVAL;
}
- if (unlikely(copy_from_user(vhash, caop->tag, caop->tag_len))) {
+ if (unlikely(copy_from_user(vhash, caop->tag, caop->tag_len)))
return -EFAULT;
- }
ret = cryptodev_hash_update(&ses_ptr->hdata,
auth_sg, auth_len);
diff --git a/drivers/staging/crypto/cryptodev/ioctl.c b/drivers/staging/crypto/cryptodev/ioctl.c
index 698c0f3c2994..8710913eaaad 100644
--- a/drivers/staging/crypto/cryptodev/ioctl.c
+++ b/drivers/staging/crypto/cryptodev/ioctl.c
@@ -756,11 +756,10 @@ static int get_session_info(struct fcrypt *fcr, struct session_info_op *siop)
siop->flags = 0;
if (ses_ptr->cdata.init) {
- if (ses_ptr->cdata.aead == 0) {
+ if (ses_ptr->cdata.aead == 0)
tfm = crypto_ablkcipher_tfm(ses_ptr->cdata.async.s);
- } else {
+ else
tfm = crypto_aead_tfm(ses_ptr->cdata.async.as);
- }
tfm_info_to_alg_info(&siop->cipher_info, tfm);
#ifdef CRYPTO_ALG_KERN_DRIVER_ONLY
if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY)