]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
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)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 6 Jul 2016 04:11:24 +0000 (13:11 +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 f312485f145110ab31537f9df3225e8ac1021cf8..845bf25fb9fb413b355f828592d0d1ce8207c731 100644 (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);