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>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2016-06-28 20:21:08 +09:00 committed by MyungJoo Ham
parent c07e074b7c
commit 99e65ae09a

View File

@ -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);