treewide: devm_kzalloc() -> devm_kcalloc()
[linux-2.6-microblaze.git] / drivers / crypto / talitos.c
index 7cebf0a..cf14f09 100644 (file)
@@ -3393,8 +3393,10 @@ static int talitos_probe(struct platform_device *ofdev)
                }
        }
 
-       priv->chan = devm_kzalloc(dev, sizeof(struct talitos_channel) *
-                                      priv->num_channels, GFP_KERNEL);
+       priv->chan = devm_kcalloc(dev,
+                                 priv->num_channels,
+                                 sizeof(struct talitos_channel),
+                                 GFP_KERNEL);
        if (!priv->chan) {
                dev_err(dev, "failed to allocate channel management space\n");
                err = -ENOMEM;
@@ -3411,9 +3413,10 @@ static int talitos_probe(struct platform_device *ofdev)
                spin_lock_init(&priv->chan[i].head_lock);
                spin_lock_init(&priv->chan[i].tail_lock);
 
-               priv->chan[i].fifo = devm_kzalloc(dev,
-                                               sizeof(struct talitos_request) *
-                                               priv->fifo_len, GFP_KERNEL);
+               priv->chan[i].fifo = devm_kcalloc(dev,
+                                               priv->fifo_len,
+                                               sizeof(struct talitos_request),
+                                               GFP_KERNEL);
                if (!priv->chan[i].fifo) {
                        dev_err(dev, "failed to allocate request fifo %d\n", i);
                        err = -ENOMEM;