summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps51632-regulator.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-05-05 14:18:49 -0700
committerOlof Johansson <olof@lixom.net>2014-05-05 14:18:49 -0700
commit186a73dc9a81b087d0708f21a990615957ec9c1c (patch)
treea1db8d517665fb27f25d44eacacd4b80a0d540ed /drivers/regulator/tps51632-regulator.c
parentf375964d34f8f5447dbe7a3b72c071a1d3491bca (diff)
parente7062b101537a0c4f4a8d725321772eb78100074 (diff)
Merge tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next/cleanup
Merge Kconfig cleanups from Rob Herring: Several mach kconfig clean-ups of redundant selects * tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: ARM: qcom: clean-up unneeded kconfig selects ARM: bcm: clean-up unneeded kconfig selects ARM: mvebu: clean-up unneeded kconfig selects + Linux 3.15-rc2 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/regulator/tps51632-regulator.c')
-rw-r--r--drivers/regulator/tps51632-regulator.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index b3764f594ee9..f31f22e3e1bd 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -227,10 +227,8 @@ static struct tps51632_regulator_platform_data *
struct device_node *np = dev->of_node;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(dev, "Memory alloc failed for platform data\n");
+ if (!pdata)
return NULL;
- }
pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
if (!pdata->reg_init_data) {
@@ -299,10 +297,8 @@ static int tps51632_probe(struct i2c_client *client,
}
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
- if (!tps) {
- dev_err(&client->dev, "Memory allocation failed\n");
+ if (!tps)
return -ENOMEM;
- }
tps->dev = &client->dev;
tps->desc.name = client->name;