summaryrefslogtreecommitdiff
path: root/drivers/crypto/msm/qcedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/msm/qcedev.c')
-rw-r--r--drivers/crypto/msm/qcedev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/msm/qcedev.c b/drivers/crypto/msm/qcedev.c
index a629c621648c..5ce87a6edcc3 100644
--- a/drivers/crypto/msm/qcedev.c
+++ b/drivers/crypto/msm/qcedev.c
@@ -1987,9 +1987,9 @@ static ssize_t _debug_stats_read(struct file *file, char __user *buf,
len = _disp_stats(qcedev);
- 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;
}