mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
crypto: octeontx2 - uninitialized variable in kvf_limits_store()
If kstrtoint() fails then "lfs_num" is uninitialized and the warning
doesn't make any sense. Just delete it.
Fixes: 8ec8015a31
("crypto: octeontx2 - add support to process the crypto request")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
5876b0cb88
commit
0ea275df84
@ -494,12 +494,11 @@ static ssize_t kvf_limits_store(struct device *dev,
|
|||||||
{
|
{
|
||||||
struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev);
|
struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev);
|
||||||
int lfs_num;
|
int lfs_num;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (kstrtoint(buf, 0, &lfs_num)) {
|
ret = kstrtoint(buf, 0, &lfs_num);
|
||||||
dev_err(dev, "lfs count %d must be in range [1 - %d]\n",
|
if (ret)
|
||||||
lfs_num, num_online_cpus());
|
return ret;
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
if (lfs_num < 1 || lfs_num > num_online_cpus()) {
|
if (lfs_num < 1 || lfs_num > num_online_cpus()) {
|
||||||
dev_err(dev, "lfs count %d must be in range [1 - %d]\n",
|
dev_err(dev, "lfs count %d must be in range [1 - %d]\n",
|
||||||
lfs_num, num_online_cpus());
|
lfs_num, num_online_cpus());
|
||||||
|
Loading…
Reference in New Issue
Block a user