summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2021-08-27 16:43:10 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-09-17 11:05:11 +0800
commitcbbb5f07ab737f868f90d429255d5d644280f6a9 (patch)
tree0a820e2f53499ff7f785e8171bda8e727d079106
parent898387e40cf538b7d1605e05d456699fe418a77f (diff)
crypto: hisilicon - Fix sscanf format signedness
The function qm_qos_value_init expects an unsigned integer but is incorrectly supplying a signed format to sscanf. This patch fixes it. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/hisilicon/qm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 369562d34d66..cf9ec5625a1e 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -4185,7 +4185,7 @@ static ssize_t qm_qos_value_init(const char *buf, unsigned long *val)
return -EINVAL;
}
- ret = sscanf(buf, "%ld", val);
+ ret = sscanf(buf, "%lu", val);
if (ret != QM_QOS_VAL_NUM)
return -EINVAL;