1
0
Fork 0

platform/mellanox: Use 2-factor allocator calls

As already done treewide, switch from open-coded multiplication to using
2-factor allocation helpers.

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
hifive-unleashed-5.1
Kees Cook 2018-07-04 10:29:08 -07:00 committed by Andy Shevchenko
parent eca4c4e47e
commit e78fd3c3ee
1 changed files with 2 additions and 2 deletions

View File

@ -152,8 +152,8 @@ static int mlxreg_io_attr_init(struct mlxreg_io_priv_data *priv)
{
int i;
priv->group.attrs = devm_kzalloc(&priv->pdev->dev,
priv->pdata->counter *
priv->group.attrs = devm_kcalloc(&priv->pdev->dev,
priv->pdata->counter,
sizeof(struct attribute *),
GFP_KERNEL);
if (!priv->group.attrs)