PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 28 Jun 2016 11:21:08 +0000 (20:21 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:27 +0000 (14:33 +0900)
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>
drivers/devfreq/event/exynos-ppmu.c

index 12d1aa7..1b9cfca 100644 (file)
@@ -479,7 +479,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);