Message ID | 1604135228-18410-6-git-send-email-qianweili@huawei.com |
---|---|
State | Accepted |
Commit | 09493afbc62781bd9fba6224af89fd78fe33b8ba |
Headers | show |
Series | crypto: hisilicon/qm - misc clean up | expand |
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 17f84db..25c5414 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -932,7 +932,8 @@ static ssize_t qm_debug_read(struct file *filp, char __user *buf, return -EINVAL; } mutex_unlock(&file->lock); - ret = sprintf(tbuf, "%u\n", val); + + ret = scnprintf(tbuf, QM_DBG_TMP_BUF_LEN, "%u\n", val); return simple_read_from_buffer(buf, count, pos, tbuf, ret); }