linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
@ 2020-06-04 12:42 yu kuai
  2020-06-23 13:04 ` Shawn Guo
  0 siblings, 1 reply; 2+ messages in thread
From: yu kuai @ 2020-06-04 12:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, linux-imx, mfuzzey
  Cc: linux-arm-kernel, linux-kernel, yukuai3, yi.zhang

if of_find_device_by_node() succeed, imx_suspend_alloc_ocram() doesn't
have a corresponding put_device(). Thus add a jump target to fix the
exception handling for this function implementation.

Fixes: 1579c7b9fe01 ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.")
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 arch/arm/mach-imx/pm-imx5.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c
index f057df813f83..e9962b48e30c 100644
--- a/arch/arm/mach-imx/pm-imx5.c
+++ b/arch/arm/mach-imx/pm-imx5.c
@@ -295,14 +295,14 @@ static int __init imx_suspend_alloc_ocram(
 	if (!ocram_pool) {
 		pr_warn("%s: ocram pool unavailable!\n", __func__);
 		ret = -ENODEV;
-		goto put_node;
+		goto put_device;
 	}
 
 	ocram_base = gen_pool_alloc(ocram_pool, size);
 	if (!ocram_base) {
 		pr_warn("%s: unable to alloc ocram!\n", __func__);
 		ret = -ENOMEM;
-		goto put_node;
+		goto put_device;
 	}
 
 	phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@@ -312,6 +312,8 @@ static int __init imx_suspend_alloc_ocram(
 	if (virt_out)
 		*virt_out = virt;
 
+put_device:
+	put_device(&pdev->dev);
 put_node:
 	of_node_put(node);
 
-- 
2.25.4


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

* Re: [PATCH] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
  2020-06-04 12:42 [PATCH] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() yu kuai
@ 2020-06-23 13:04 ` Shawn Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2020-06-23 13:04 UTC (permalink / raw)
  To: yu kuai
  Cc: s.hauer, kernel, festevam, linux-imx, mfuzzey, linux-arm-kernel,
	linux-kernel, yi.zhang

On Thu, Jun 04, 2020 at 08:42:06PM +0800, yu kuai wrote:
> if of_find_device_by_node() succeed, imx_suspend_alloc_ocram() doesn't
> have a corresponding put_device(). Thus add a jump target to fix the
> exception handling for this function implementation.
> 
> Fixes: 1579c7b9fe01 ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.")
> Signed-off-by: yu kuai <yukuai3@huawei.com>

Applied, thanks.

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

end of thread, other threads:[~2020-06-23 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-04 12:42 [PATCH] ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram() yu kuai
2020-06-23 13:04 ` Shawn Guo

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).