Explorar o código

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>
Bartlomiej Zolnierkiewicz %!s(int64=9) %!d(string=hai) anos
pai
achega
99e65ae09a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      drivers/devfreq/event/exynos-ppmu.c

+ 2 - 1
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);