aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/atmel-aes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 8061336e07e7..fe19baeb27ac 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -332,7 +332,7 @@ static int atmel_aes_crypt_cpu_start(struct atmel_aes_dev *dd)
332 return -EINVAL; 332 return -EINVAL;
333 333
334 dd->nb_out_sg = atmel_aes_sg_length(dd->req, dd->out_sg); 334 dd->nb_out_sg = atmel_aes_sg_length(dd->req, dd->out_sg);
335 if (!dd->nb_in_sg) 335 if (!dd->nb_out_sg)
336 return -EINVAL; 336 return -EINVAL;
337 337
338 dd->bufcnt = sg_copy_to_buffer(dd->in_sg, dd->nb_in_sg, 338 dd->bufcnt = sg_copy_to_buffer(dd->in_sg, dd->nb_in_sg,