regulator: tps6507x: Remove redundant error message
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 20 Feb 2014 08:53:14 +0000 (14:23 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 11:53:09 +0000 (20:53 +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/tps6507x-regulator.c

index e506e7f..98e66ce 100644 (file)
@@ -380,10 +380,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data(
 
        tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board),
                                        GFP_KERNEL);
-       if (!tps_board) {
-               dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n");
+       if (!tps_board)
                return NULL;
-       }
 
        regulators = of_get_child_by_name(np, "regulators");
        if (!regulators) {
@@ -406,10 +404,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data(
 
        reg_data = devm_kzalloc(&pdev->dev, (sizeof(struct regulator_init_data)
                                        * TPS6507X_NUM_REGULATOR), GFP_KERNEL);
-       if (!reg_data) {
-               dev_err(&pdev->dev, "Failure to alloc init data for regulators.\n");
+       if (!reg_data)
                return NULL;
-       }
 
        tps_board->tps6507x_pmic_init_data = reg_data;