aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/msm/qcrypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/msm/qcrypto.c')
-rw-r--r--drivers/crypto/msm/qcrypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/msm/qcrypto.c b/drivers/crypto/msm/qcrypto.c
index bbf4ef693ed..8d1c7e27e3b 100644
--- a/drivers/crypto/msm/qcrypto.c
+++ b/drivers/crypto/msm/qcrypto.c
@@ -4918,9 +4918,9 @@ static ssize_t _debug_stats_read(struct file *file, char __user *buf,
len = _disp_stats(qcrypto);
- rc = simple_read_from_buffer((void __user *) buf, len,
+ if (len <= count)
+ rc = simple_read_from_buffer((void __user *) buf, len,
ppos, (void *) _debug_read_buf, len);
-
return rc;
}