summaryrefslogtreecommitdiff
path: root/drivers/regulator/s2mps11.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2014-10-16 10:23:28 +0200
committerMark Brown <broonie@kernel.org>2014-10-20 12:24:04 +0100
commit80e82ac2ddf0e3de6f38de863b6d90de38961ed8 (patch)
treee64ed7bc1c2882580ab77942ae7c6837db948faf /drivers/regulator/s2mps11.c
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
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: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/s2mps11.c')
-rw-r--r--drivers/regulator/s2mps11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index adab82d5279f..7f59e67252e7 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -845,7 +845,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
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,
GFP_KERNEL);
if (!s2mps11->ext_control_gpio)