[PATCH 15/15] regulator: as3711: Remove redundant error message

From: Sachin Kamat
Date: Tue Feb 18 2014 - 05:47:42 EST


kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
drivers/regulator/as3711-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

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 = &regs[id];
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/