summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2016-06-28 20:21:08 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-07-06 13:11:24 +0900
commit99e65ae09a1c853fe36a89d9333fdcbff07de327 (patch)
treebc3702c95a404ed92277dfba175d9cb349230206
parentc07e074b7cae0eff47453f96438c9a867aa6f82e (diff)
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@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r--drivers/devfreq/event/exynos-ppmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index f312485f1451..845bf25fb9fb 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);