From: Sachin Kamat Date: Tue, 18 Feb 2014 10:41:11 +0000 (+0530) Subject: regulator: as3711: Remove redundant error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31833581de5a4bd2f087c361f757865d1d12f23d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git regulator: as3711: 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/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 856c55f3a832..b47283f91e2d 100644 --- a/drivers/regulator/as3711-regulator.c +++ b/drivers/regulator/as3711-regulator.c @@ -245,10 +245,8 @@ static int as3711_regulator_probe(struct platform_device *pdev) regs = devm_kzalloc(&pdev->dev, AS3711_REGULATOR_NUM * sizeof(struct as3711_regulator), GFP_KERNEL); - if (!regs) { - dev_err(&pdev->dev, "Memory allocation failed exiting..\n"); + if (!regs) return -ENOMEM; - } for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) { reg = ®s[id];