diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-11 13:10:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-11 13:10:30 -0400 |
commit | 834d3cd294abd9ad81c6cbaefdda28aa491ceb06 (patch) | |
tree | ac7f551b7192bc9236bc45d4641053267733a8e1 /drivers/pci/controller | |
parent | 9f203e2f2f065cd74553e6474f0ae3675f39fb0f (diff) | |
parent | 329e09893909d409039f6a79757d9b80b67efe39 (diff) |
Merge tag 'alloc-args-v4.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Kees writes:
"Fix open-coded multiplication arguments to allocators
- Fixes several new open-coded multiplications added in the 4.19
merge window."
* tag 'alloc-args-v4.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
treewide: Replace more open-coded allocation size multiplications
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r-- | drivers/pci/controller/pcie-cadence.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-cadence.c b/drivers/pci/controller/pcie-cadence.c index 86f1b002c846..975bcdd6b5c0 100644 --- a/drivers/pci/controller/pcie-cadence.c +++ b/drivers/pci/controller/pcie-cadence.c | |||
@@ -180,11 +180,11 @@ int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie) | |||
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | 182 | ||
183 | phy = devm_kzalloc(dev, sizeof(*phy) * phy_count, GFP_KERNEL); | 183 | phy = devm_kcalloc(dev, phy_count, sizeof(*phy), GFP_KERNEL); |
184 | if (!phy) | 184 | if (!phy) |
185 | return -ENOMEM; | 185 | return -ENOMEM; |
186 | 186 | ||
187 | link = devm_kzalloc(dev, sizeof(*link) * phy_count, GFP_KERNEL); | 187 | link = devm_kcalloc(dev, phy_count, sizeof(*link), GFP_KERNEL); |
188 | if (!link) | 188 | if (!link) |
189 | return -ENOMEM; | 189 | return -ENOMEM; |
190 | 190 | ||