aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/inside-secure/safexcel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel.c')
-rw-r--r--drivers/crypto/inside-secure/safexcel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 7e71043457a6..86c699c14f84 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1044,7 +1044,8 @@ static int safexcel_probe(struct platform_device *pdev)
1044 1044
1045 safexcel_configure(priv); 1045 safexcel_configure(priv);
1046 1046
1047 priv->ring = devm_kzalloc(dev, priv->config.rings * sizeof(*priv->ring), 1047 priv->ring = devm_kcalloc(dev, priv->config.rings,
1048 sizeof(*priv->ring),
1048 GFP_KERNEL); 1049 GFP_KERNEL);
1049 if (!priv->ring) { 1050 if (!priv->ring) {
1050 ret = -ENOMEM; 1051 ret = -ENOMEM;
@@ -1063,8 +1064,9 @@ static int safexcel_probe(struct platform_device *pdev)
1063 if (ret) 1064 if (ret)
1064 goto err_reg_clk; 1065 goto err_reg_clk;
1065 1066
1066 priv->ring[i].rdr_req = devm_kzalloc(dev, 1067 priv->ring[i].rdr_req = devm_kcalloc(dev,
1067 sizeof(priv->ring[i].rdr_req) * EIP197_DEFAULT_RING_SIZE, 1068 EIP197_DEFAULT_RING_SIZE,
1069 sizeof(priv->ring[i].rdr_req),
1068 GFP_KERNEL); 1070 GFP_KERNEL);
1069 if (!priv->ring[i].rdr_req) { 1071 if (!priv->ring[i].rdr_req) {
1070 ret = -ENOMEM; 1072 ret = -ENOMEM;