diff options
author | Kees Cook <keescook@chromium.org> | 2018-10-05 19:21:46 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2018-10-05 21:06:30 -0400 |
commit | 329e09893909d409039f6a79757d9b80b67efe39 (patch) | |
tree | d83759b28dcc8760167ed7c082d5846f63a55d2d /drivers/bluetooth | |
parent | 57361846b52bc686112da6ca5368d11210796804 (diff) |
treewide: Replace more open-coded allocation size multiplications
As done treewide earlier, this catches several more open-coded
allocation size calculations that were added to the kernel during the
merge window. This performs the following mechanical transformations
using Coccinelle:
kvmalloc(a * b, ...) -> kvmalloc_array(a, b, ...)
kvzalloc(a * b, ...) -> kvcalloc(a, b, ...)
devm_kzalloc(..., a * b, ...) -> devm_kcalloc(..., a, b, ...)
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_qca.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index e182f6019f68..2fee65886d50 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c | |||
@@ -1322,7 +1322,7 @@ static int qca_init_regulators(struct qca_power *qca, | |||
1322 | { | 1322 | { |
1323 | int i; | 1323 | int i; |
1324 | 1324 | ||
1325 | qca->vreg_bulk = devm_kzalloc(qca->dev, num_vregs * | 1325 | qca->vreg_bulk = devm_kcalloc(qca->dev, num_vregs, |
1326 | sizeof(struct regulator_bulk_data), | 1326 | sizeof(struct regulator_bulk_data), |
1327 | GFP_KERNEL); | 1327 | GFP_KERNEL); |
1328 | if (!qca->vreg_bulk) | 1328 | if (!qca->vreg_bulk) |