From: Sachin Kamat Date: Thu, 20 Feb 2014 08:53:11 +0000 (+0530) Subject: regulator: s5m8767: Remove redundant error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4754b4211ddc9e6ebec97b0088a1c0ecb558f780;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git regulator: s5m8767: 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/s5m8767.c b/drivers/regulator/s5m8767.c index 6850a25a41c4..6884eb880dc9 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -612,19 +612,13 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev, rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) * pdata->num_regulators, GFP_KERNEL); - if (!rdata) { - dev_err(iodev->dev, - "could not allocate memory for regulator data\n"); + if (!rdata) return -ENOMEM; - } rmode = devm_kzalloc(&pdev->dev, sizeof(*rmode) * pdata->num_regulators, GFP_KERNEL); - if (!rmode) { - dev_err(iodev->dev, - "could not allocate memory for regulator mode\n"); + if (!rmode) return -ENOMEM; - } pdata->regulators = rdata; pdata->opmode = rmode;