Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e78fd3c3 authored by Kees Cook's avatar Kees Cook Committed by Andy Shevchenko
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent eca4c4e4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -152,8 +152,8 @@ static int mlxreg_io_attr_init(struct mlxreg_io_priv_data *priv)
{
{
	int i;
	int i;


	priv->group.attrs = devm_kzalloc(&priv->pdev->dev,
	priv->group.attrs = devm_kcalloc(&priv->pdev->dev,
					 priv->pdata->counter *
					 priv->pdata->counter,
					 sizeof(struct attribute *),
					 sizeof(struct attribute *),
					 GFP_KERNEL);
					 GFP_KERNEL);
	if (!priv->group.attrs)
	if (!priv->group.attrs)