From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:07 +0000 (+0530) Subject: regulator: max8907: Remove redundant error message X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d016bdc7f4e8b2848d8992f99e226f03abe53716;p=linux-beck.git regulator: max8907: 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/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index afda8c6af721..ed90c759c231 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -292,10 +292,9 @@ static int max8907_regulator_probe(struct platform_device *pdev) return ret; pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); - if (!pmic) { - dev_err(&pdev->dev, "Failed to alloc pmic\n"); + if (!pmic) return -ENOMEM; - } + platform_set_drvdata(pdev, pmic); memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));