From: Jingoo Han Date: Mon, 2 Jun 2014 06:27:21 +0000 (+0900) Subject: regulator: bcm590xx: remove unnecessary OOM messages X-Git-Tag: v3.17-rc1~113^2~5^6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c969faadf02076641a81197f2e8641c40d232edd;p=karo-tx-linux.git regulator: bcm590xx: remove unnecessary OOM messages The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han Acked-by: Matt Porter Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c index c3750c5b382b..6ac27701ff83 100644 --- a/drivers/regulator/bcm590xx-regulator.c +++ b/drivers/regulator/bcm590xx-regulator.c @@ -263,10 +263,8 @@ static struct bcm590xx_board *bcm590xx_parse_dt_reg_data( } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); - if (!data) { - dev_err(&pdev->dev, "failed to allocate regulator board data\n"); + if (!data) return NULL; - } np = of_node_get(np); regulators = of_get_child_by_name(np, "regulators"); @@ -311,10 +309,8 @@ static int bcm590xx_probe(struct platform_device *pdev) &bcm590xx_reg_matches); pmu = devm_kzalloc(&pdev->dev, sizeof(*pmu), GFP_KERNEL); - if (!pmu) { - dev_err(&pdev->dev, "Memory allocation failed for pmu\n"); + if (!pmu) return -ENOMEM; - } pmu->mfd = bcm590xx; @@ -322,17 +318,13 @@ static int bcm590xx_probe(struct platform_device *pdev) pmu->desc = devm_kzalloc(&pdev->dev, BCM590XX_NUM_REGS * sizeof(struct regulator_desc), GFP_KERNEL); - if (!pmu->desc) { - dev_err(&pdev->dev, "Memory alloc fails for desc\n"); + if (!pmu->desc) return -ENOMEM; - } pmu->info = devm_kzalloc(&pdev->dev, BCM590XX_NUM_REGS * sizeof(struct bcm590xx_info *), GFP_KERNEL); - if (!pmu->info) { - dev_err(&pdev->dev, "Memory alloc fails for info\n"); + if (!pmu->info) return -ENOMEM; - } info = bcm590xx_regs;