[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1467112869-30488-1-git-send-email-b.zolnierkie@samsung.com>
Date: Tue, 28 Jun 2016 13:21:08 +0200
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Chanwoo Choi <cw00.choi@...sung.com>
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
b.zolnierkie@...sung.com
Subject: [PATCH] PM / devfreq: exynos-ppmu: fix error path in
exynos_ppmu_probe()
iounmap() needs to be called in case of memory allocation
(for devfreq-event devices) failure. Fix it.
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
---
drivers/devfreq/event/exynos-ppmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index f312485..845bf25 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -482,7 +482,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
if (!info->edev) {
dev_err(&pdev->dev,
"failed to allocate memory devfreq-event devices\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto err;
}
edev = info->edev;
platform_set_drvdata(pdev, info);
--
1.9.1
Powered by blists - more mailing lists