]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/blobdiff - drivers/pci/controller/pcie-cadence.c
treewide: Replace more open-coded allocation size multiplications
[rpmsg/rpmsg.git] / drivers / pci / controller / pcie-cadence.c
index 86f1b002c846a395ca7c93bcc5866ab0fe3aa374..975bcdd6b5c0a73e0c75a947574c0b6b9b774e10 100644 (file)
@@ -180,11 +180,11 @@ int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie)
                return 0;
        }
 
-       phy = devm_kzalloc(dev, sizeof(*phy) * phy_count, GFP_KERNEL);
+       phy = devm_kcalloc(dev, phy_count, sizeof(*phy), GFP_KERNEL);
        if (!phy)
                return -ENOMEM;
 
-       link = devm_kzalloc(dev, sizeof(*link) * phy_count, GFP_KERNEL);
+       link = devm_kcalloc(dev, phy_count, sizeof(*link), GFP_KERNEL);
        if (!link)
                return -ENOMEM;