Merge branch 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
[cascardo/linux.git] / drivers / regulator / tps62360-regulator.c
index c3fa15a..a167204 100644 (file)
@@ -299,10 +299,8 @@ static struct tps62360_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) {
@@ -377,11 +375,8 @@ static int tps62360_probe(struct i2c_client *client,
        }
 
        tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
-       if (!tps) {
-               dev_err(&client->dev, "%s(): Memory allocation failed\n",
-                                               __func__);
+       if (!tps)
                return -ENOMEM;
-       }
 
        tps->en_discharge = pdata->en_discharge;
        tps->en_internal_pulldn = pdata->en_internal_pulldn;