Skip to content

Commit 586745f

Browse files
YuKuai-huaweiShawn Guo
authored andcommitted
ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
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: 1579c7b ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.") Signed-off-by: yu kuai <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent c95c969 commit 586745f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm/mach-imx/pm-imx5.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,14 @@ static int __init imx_suspend_alloc_ocram(
295295
if (!ocram_pool) {
296296
pr_warn("%s: ocram pool unavailable!\n", __func__);
297297
ret = -ENODEV;
298-
goto put_node;
298+
goto put_device;
299299
}
300300

301301
ocram_base = gen_pool_alloc(ocram_pool, size);
302302
if (!ocram_base) {
303303
pr_warn("%s: unable to alloc ocram!\n", __func__);
304304
ret = -ENOMEM;
305-
goto put_node;
305+
goto put_device;
306306
}
307307

308308
phys = gen_pool_virt_to_phys(ocram_pool, ocram_base);
@@ -312,6 +312,8 @@ static int __init imx_suspend_alloc_ocram(
312312
if (virt_out)
313313
*virt_out = virt;
314314

315+
put_device:
316+
put_device(&pdev->dev);
315317
put_node:
316318
of_node_put(node);
317319

0 commit comments

Comments
 (0)