提交 e78fd3c3 编写于 作者: K Kees Cook 提交者: Andy Shevchenko

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: NKees Cook <keescook@chromium.org>
Acked-by: NVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 eca4c4e4
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册