cpufreq: exynos: Fix for memory leak in case SoC name does not match
Subsystems (2)
PATCH 1/1 cpufreq: exynos: Fix for memory leak in case SoC name does not match
From: Shailendra Verma <[email protected]>
During probe free the memory allocated to "exynos_info" in case of unknown SoC type.
---
Hi Rafael and Viresh,
Since this is a fix to prevent memory leak, it would be better if this could be sent to linus during -rc via cpufreq tree.
Thanks,
Kukjin
drivers/cpufreq/exynos-cpufreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/cpufreq/exynos-cpufreq.c +4 -2
@@ -180,7 +180,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) ret =exynos5250_cpufreq_init (exynos_info); }else {pr_err ("%s: Unknown SoC type\n" , __func__); -return -ENODEV ; + ret = -ENODEV ; }if (ret)
@@ -188,12 +188,14 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)if (exynos_info->set_freq ==NULL ) {dev_err (&pdev->dev,"No set_freq function (ERR)\n" ); + ret = -EINVAL ; goto err_vdd_arm; } arm_regulator =regulator_get (NULL ,"vdd_arm" );if (IS_ERR (arm_regulator)) {dev_err (&pdev->dev,"failed to get resource vdd_arm\n" ); + ret = -EINVAL ; goto err_vdd_arm; }
@@ -225,7 +227,7 @@ err_cpufreq_reg:regulator_put (arm_regulator); err_vdd_arm:kfree (exynos_info); -return -EINVAL ; +return ret; }static struct platform_driver exynos_cpufreq_platdrv = {
Signature · 1 line
2.0.0
Quoted 11 lines · Kukjin Kim
From: Shailendra Verma <[email protected]>
During probe free the memory allocated to "
exynos_info" in case of unknown SoC type.Signed-off-by Shailendra Verma <[email protected]>Acked-by Viresh Kumar <[email protected]>Acked-by Lukasz Majewski <[email protected]>[k.kozlowski: Rebased the patch around if(of_machine_is_compatible)]Signed-off-by Krzysztof Kozlowski <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
Quoted 5 lines
---
Hi Rafael and Viresh,Since this is a fix to prevent memory leak, it would be better if this could be sent to linus during -rc via cpufreq tree.
I'm not planning more pull requests for 4.2 and this one doesn't seem to be a good enough reason for a pull request of its own, though.
Of course, if there are more urgent fixes, I can push it along with them, but there are none so far.
Thanks,
Rafael
W dniu 06.08.2015 o 09:23, Rafael J. Wysocki pisze:
Quoted 15 lines · Kukjin Kim
Quoted 14 lines
From: Shailendra Verma <[email protected]>
During probe free the memory allocated to "
exynos_info" in case of unknown SoC type.Signed-off-by Shailendra Verma <[email protected]>Acked-by Viresh Kumar <[email protected]>Acked-by Lukasz Majewski <[email protected]>[k.kozlowski: Rebased the patch around if(of_machine_is_compatible)]Signed-off-by Krzysztof Kozlowski <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
Hi Rafael and Viresh,
Quoted 8 lines
Quoted 2 lines
Since this is a fix to prevent memory leak, it would be better if this could be sent to linus during -rc via cpufreq tree.
I'm not planning more pull requests for 4.2 and this one doesn't seem to be a good enough reason for a pull request of its own, though.
Of course, if there are more urgent fixes, I can push it along with them, but there are none so far.
The cpufreq driver will be removed completely in v4.3 or v4.4 with patchset adding cpufreq-dt support for Exynos 4x12. This means that this patch makes sense only for 4.2 and as a stable backport (but it was not marked as such).
Anyone thinks that the patch will be worth stable back-porting?
Best regards,
Krzysztof
Viresh Kumar
maintainerQuoted 6 lines · Krzysztof Kozlowski
The cpufreq driver will be removed completely in v4.3 or v4.4 with patchset adding cpufreq-dt support for Exynos 4x12. This means that this patch makes sense only for 4.2 and as a stable backport (but it was not marked as such).
Anyone thinks that the patch will be worth stable back-porting?
Doesn't look worth enough to me..
Signature · 1 line
viresh
Quoted 22 lines · Krzysztof Kozlowski
W dniu 06.08.2015 o 09:23, Rafael J. Wysocki pisze:
Quoted 21 lines · Kukjin Kim
Quoted 11 lines
From: Shailendra Verma <[email protected]>
During probe free the memory allocated to "
exynos_info" in case of unknown SoC type.Signed-off-by Shailendra Verma <[email protected]>Acked-by Viresh Kumar <[email protected]>Acked-by Lukasz Majewski <[email protected]>[k.kozlowski: Rebased the patch around if(of_machine_is_compatible)]Signed-off-by Krzysztof Kozlowski <[email protected]>Signed-off-by Kukjin Kim <[email protected]>Quoted 5 lines
---
Hi Rafael and Viresh,Since this is a fix to prevent memory leak, it would be better if this could be sent to linus during -rc via cpufreq tree.
I'm not planning more pull requests for 4.2 and this one doesn't seem to be a good enough reason for a pull request of its own, though.
Quoted 7 lines
Quoted 2 lines
Of course, if there are more urgent fixes, I can push it along with them, but there are none so far.
The cpufreq driver will be removed completely in v4.3 or v4.4 with patchset adding cpufreq-dt support for Exynos 4x12. This means that this patch makes sense only for 4.2 and as a stable backport (but it was not marked as such).
Since I have one more ACPI fix for 4.2, I've applied this one and will push it to Linus next week.
Thanks,
Rafael
Quoted 27 lines · Rafael J. Wysocki
Quoted 25 lines · Krzysztof Kozlowski
W dniu 06.08.2015 o 09:23, Rafael J. Wysocki pisze:
Quoted 23 lines · Kukjin Kim
Quoted 11 lines
From: Shailendra Verma <[email protected]>
During probe free the memory allocated to "
exynos_info" in case of unknown SoC type.Signed-off-by Shailendra Verma <[email protected]>Acked-by Viresh Kumar <[email protected]>Acked-by Lukasz Majewski <[email protected]>[k.kozlowski: Rebased the patch around if(of_machine_is_compatible)]Signed-off-by Krzysztof Kozlowski <[email protected]>Signed-off-by Kukjin Kim <[email protected]>Quoted 5 lines
---
Hi Rafael and Viresh,Since this is a fix to prevent memory leak, it would be better if this could be sent to linus during -rc via cpufreq tree.
I'm not planning more pull requests for 4.2 and this one doesn't seem to be a good enough reason for a pull request of its own, though.
Of course, if there are more urgent fixes, I can push it along with them, but there are none so far.
Quoted 8 lines
Quoted 4 lines
The cpufreq driver will be removed completely in v4.3 or v4.4 with patchset adding cpufreq-dt support for Exynos 4x12. This means that this patch makes sense only for 4.2 and as a stable backport (but it was not marked as such).
Since I have one more ACPI fix for 4.2, I've applied this one and will push it to Linus next week.
Rafael, thanks.
- Kukjin