aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-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 *
227 struct device_node *np = dev->of_node; 227 struct device_node *np = dev->of_node;
228 228
229 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 229 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
230 if (!pdata) { 230 if (!pdata)
231 dev_err(dev, "Memory alloc failed for platform data\n");
232 return NULL; 231 return NULL;
233 }
234 232
235 pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node); 233 pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node);
236 if (!pdata->reg_init_data) { 234 if (!pdata->reg_init_data) {
@@ -299,10 +297,8 @@ static int tps51632_probe(struct i2c_client *client,
299 } 297 }
300 298
301 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); 299 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
302 if (!tps) { 300 if (!tps)
303 dev_err(&client->dev, "Memory allocation failed\n");
304 return -ENOMEM; 301 return -ENOMEM;
305 }
306 302
307 tps->dev = &client->dev; 303 tps->dev = &client->dev;
308 tps->desc.name = client->name; 304 tps->desc.name = client->name;