Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[~shefty/rdma-dev.git] / drivers / crypto / atmel-aes.c
index c9d9d5c..6f22ba5 100644 (file)
@@ -332,7 +332,7 @@ static int atmel_aes_crypt_cpu_start(struct atmel_aes_dev *dd)
                return -EINVAL;
 
        dd->nb_out_sg = atmel_aes_sg_length(dd->req, dd->out_sg);
-       if (!dd->nb_in_sg)
+       if (!dd->nb_out_sg)
                return -EINVAL;
 
        dd->bufcnt = sg_copy_to_buffer(dd->in_sg, dd->nb_in_sg,