* [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
* [PATCH] PM / devfreq: exynos: fix error path in exynos_bus_probe()
2016-06-28 11:21 [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() Bartlomiej Zolnierkiewicz
@ 2016-06-28 11:21 ` 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
1 sibling, 1 reply; 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
In case of exynos_bus_parse_of() failure the code shouldn't
try to remove the OPP table and disable+unprepare bus->clk
as it has been already handled in exynos_bus_parse_of().
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/devfreq/exynos-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 2363d0a..e946f8f 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
/* Parse the device-tree to get the resource information */
ret = exynos_bus_parse_of(np, bus);
if (ret < 0)
- goto err;
+ return ret;
profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL);
if (!profile) {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / devfreq: exynos: fix error path in exynos_bus_probe()
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
0 siblings, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2016-06-28 12:05 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel
2016-06-28 20:21 GMT+09:00 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>:
> In case of exynos_bus_parse_of() failure the code shouldn't
> try to remove the OPP table and disable+unprepare bus->clk
> as it has been already handled in exynos_bus_parse_of().
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
> drivers/devfreq/exynos-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..e946f8f 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
> /* Parse the device-tree to get the resource information */
> ret = exynos_bus_parse_of(np, bus);
> if (ret < 0)
> - goto err;
> + return ret;
>
> profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL);
> if (!profile) {
> --
> 1.9.1
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
And, this patch fixes the bug. It should be included in v4.7-rc version.
Thanks,
Chanwoo Choi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe()
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:10 ` Chanwoo Choi
1 sibling, 0 replies; 4+ messages in thread
From: Chanwoo Choi @ 2016-06-28 12:10 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel
2016-06-28 20:21 GMT+09:00 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>:
> 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
>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Also, this patch fix the bug. So, this patch should be included in v4.7-rc.
Thanks,
Chanwoo Choi
^ permalink raw reply [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).