Commit 80e82ac2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

regulator: s2mps11: Don't zero allocated memory for external control

The driver was allocating memory for storing GPIOs for external control
with unnecessary GFP_ZERO flag. Then right after allocation it
initialized memory to -EINVAL in loop. Skip the GFP_ZERO flag.
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f114040e
...@@ -845,7 +845,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) ...@@ -845,7 +845,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
}; };
s2mps11->ext_control_gpio = devm_kzalloc(&pdev->dev, s2mps11->ext_control_gpio = devm_kmalloc(&pdev->dev,
sizeof(*s2mps11->ext_control_gpio) * s2mps11->rdev_num, sizeof(*s2mps11->ext_control_gpio) * s2mps11->rdev_num,
GFP_KERNEL); GFP_KERNEL);
if (!s2mps11->ext_control_gpio) if (!s2mps11->ext_control_gpio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment