regulator: tps51632: Remove redundant error message
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 20 Feb 2014 08:53:12 +0000 (14:23 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 11:50:01 +0000 (20:50 +0900)
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/tps51632-regulator.c

index b3764f594ee933703394ebacd0e6610aa7c809bc..f31f22e3e1bd56c0b6f1e36a07152f8c3d0039bc 100644 (file)
@@ -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;