From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:03 +0000 (+0530) Subject: regulator: dbx500: Remove redundant error message X-Git-Tag: firefly_0821_release~176^2~4202^2~5^8~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cb487c5c0ed3da63b04d9f866fa085a88ce2d0eb;p=firefly-linux-kernel-4.4.55.git regulator: dbx500: Remove redundant error message kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c index ce89f7848a57..f111dfb8d2d7 100644 --- a/drivers/regulator/dbx500-prcmu.c +++ b/drivers/regulator/dbx500-prcmu.c @@ -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;