diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/mellanox/mlxreg-hotplug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c index ea9e7f4479ca..36a41ff506f0 100644 --- a/drivers/platform/mellanox/mlxreg-hotplug.c +++ b/drivers/platform/mellanox/mlxreg-hotplug.c | |||
@@ -217,7 +217,8 @@ static int mlxreg_hotplug_attr_init(struct mlxreg_hotplug_priv_data *priv) | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | priv->group.attrs = devm_kzalloc(&priv->pdev->dev, num_attrs * | 220 | priv->group.attrs = devm_kcalloc(&priv->pdev->dev, |
221 | num_attrs, | ||
221 | sizeof(struct attribute *), | 222 | sizeof(struct attribute *), |
222 | GFP_KERNEL); | 223 | GFP_KERNEL); |
223 | if (!priv->group.attrs) | 224 | if (!priv->group.attrs) |