[media] ddbridge: Replace vmalloc with vzalloc

vzalloc combines vmalloc and memset 0.

The Coccinelle semantic patch used to make this change is as follows:
@@
type T;
T *d;
expression e;
statement S;
@@

        d =
-            vmalloc
+            vzalloc
             (...);
        if (!d) S
-       memset(d, 0, sizeof(T));

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Amitoj Kaur Chawla 2016-06-20 02:55:52 -03:00 committed by Mauro Carvalho Chehab
parent e95be15886
commit 20634fd1cd

View file

@ -1569,10 +1569,9 @@ static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (pci_enable_device(pdev) < 0)
return -ENODEV;
dev = vmalloc(sizeof(struct ddb));
dev = vzalloc(sizeof(struct ddb));
if (dev == NULL)
return -ENOMEM;
memset(dev, 0, sizeof(struct ddb));
dev->pdev = pdev;
pci_set_drvdata(pdev, dev);