diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-01-24 15:48:18 -0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2015-02-04 11:13:27 +0100 |
commit | 379a5826d20f872add220fea9a679de015d8b57b (patch) | |
tree | 6b9d7f5ce3c41a1bcc130d5242d41adbbc8cac47 /drivers/regulator | |
parent | 3651b2816a0d88da3ffe6893a11ca79e0d7bf4aa (diff) | |
download | linux-stable-379a5826d20f872add220fea9a679de015d8b57b.tar.gz linux-stable-379a5826d20f872add220fea9a679de015d8b57b.tar.bz2 linux-stable-379a5826d20f872add220fea9a679de015d8b57b.zip |
regulator: gpio-regulator: Remove unneeded OOM error message
There is no need to print an OOM message after devm_kzalloc, since there is
a generic OOM message in place.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 9c25960cbba1fb452adf6a7b9d740fc4358f7d92)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index c0a1d00b78c9..bad44f366b3f 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -239,10 +239,8 @@ static int gpio_regulator_probe(struct platform_device *pdev) drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data), GFP_KERNEL); - if (drvdata == NULL) { - dev_err(&pdev->dev, "Failed to allocate device data\n"); + if (drvdata == NULL) return -ENOMEM; - } drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL); if (drvdata->desc.name == NULL) { |