crypto: inside-secure - Fix sizeof() mismatch
[ Upstream commit5.4-rM2-2.2.x-imx-squashedc98e233062
] An incorrect sizeof() is being used, sizeof(priv->ring[i].rdr_req) is not correct, it should be sizeof(*priv->ring[i].rdr_req). Note that since the size of ** is the same size as * this is not causing any issues. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes:9744fec95f
("crypto: inside-secure - remove request list to improve performance") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
parent
7044a69699
commit
9edff753ad
|
@ -1467,7 +1467,7 @@ static int safexcel_probe_generic(void *pdev,
|
||||||
|
|
||||||
priv->ring[i].rdr_req = devm_kcalloc(dev,
|
priv->ring[i].rdr_req = devm_kcalloc(dev,
|
||||||
EIP197_DEFAULT_RING_SIZE,
|
EIP197_DEFAULT_RING_SIZE,
|
||||||
sizeof(priv->ring[i].rdr_req),
|
sizeof(*priv->ring[i].rdr_req),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!priv->ring[i].rdr_req)
|
if (!priv->ring[i].rdr_req)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue