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

index ce89f78..f111dfb 100644 (file)
@@ -202,18 +202,12 @@ ux500_regulator_debug_init(struct platform_device *pdev,
        rdebug.num_regulators = num_regulators;
 
        rdebug.state_before_suspend = kzalloc(num_regulators, GFP_KERNEL);
-       if (!rdebug.state_before_suspend) {
-               dev_err(&pdev->dev,
-                       "could not allocate memory for saving state\n");
+       if (!rdebug.state_before_suspend)
                goto exit_destroy_power_state;
-       }
 
        rdebug.state_after_suspend = kzalloc(num_regulators, GFP_KERNEL);
-       if (!rdebug.state_after_suspend) {
-               dev_err(&pdev->dev,
-                       "could not allocate memory for saving state\n");
+       if (!rdebug.state_after_suspend)
                goto exit_free;
-       }
 
        dbx500_regulator_testcase(regulator_info, num_regulators);
        return 0;