linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()
@ 2016-06-28 11:21 Bartlomiej Zolnierkiewicz
  2016-06-28 11:21 ` [PATCH] PM / devfreq: exynos: fix error path in exynos_bus_probe() Bartlomiej Zolnierkiewicz
  2016-06-28 12:10 ` [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() Chanwoo Choi
  0 siblings, 2 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2016-06-28 11:21 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
	linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel,
	b.zolnierkie

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>
---
 drivers/devfreq/event/exynos-ppmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index f312485..845bf25 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-28 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28 11:21 [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() Bartlomiej Zolnierkiewicz
2016-06-28 11:21 ` [PATCH] PM / devfreq: exynos: fix error path in exynos_bus_probe() Bartlomiej Zolnierkiewicz
2016-06-28 12:05   ` Chanwoo Choi
2016-06-28 12:10 ` [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).