All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
@ 2021-11-16  6:27 ` cgel.zte
  0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2021-11-16  6:27 UTC (permalink / raw)
  To: tony
  Cc: linux, linux-arm-kernel, linux-omap, linux-kernel, Ye Guojin, Zeal Robot

From: Ye Guojin <ye.guojin@zte.com.cn>

This was found by coccicheck:
./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device;
call of_find_device_by_node on line 258, but without a corresponding
object release within this function.

Move the put_device() call before the if judgment.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
---
 arch/arm/mach-omap2/display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 6daaa645ae5d..21413a9b7b6c 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
 	}
 
 	r = of_platform_populate(node, NULL, NULL, &pdev->dev);
+	put_device(&pdev->dev);
 	if (r) {
 		pr_err("Unable to populate DSS submodule devices\n");
-		put_device(&pdev->dev);
 		return r;
 	}
 
-- 
2.25.1


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

* [PATCH] ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
@ 2021-11-16  6:27 ` cgel.zte
  0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2021-11-16  6:27 UTC (permalink / raw)
  To: tony
  Cc: linux, linux-arm-kernel, linux-omap, linux-kernel, Ye Guojin, Zeal Robot

From: Ye Guojin <ye.guojin@zte.com.cn>

This was found by coccicheck:
./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device;
call of_find_device_by_node on line 258, but without a corresponding
object release within this function.

Move the put_device() call before the if judgment.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
---
 arch/arm/mach-omap2/display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 6daaa645ae5d..21413a9b7b6c 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
 	}
 
 	r = of_platform_populate(node, NULL, NULL, &pdev->dev);
+	put_device(&pdev->dev);
 	if (r) {
 		pr_err("Unable to populate DSS submodule devices\n");
-		put_device(&pdev->dev);
 		return r;
 	}
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
  2021-11-16  6:27 ` cgel.zte
@ 2021-12-17 12:14   ` Tony Lindgren
  -1 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-12-17 12:14 UTC (permalink / raw)
  To: cgel.zte
  Cc: linux, linux-arm-kernel, linux-omap, linux-kernel, Ye Guojin, Zeal Robot

* cgel.zte@gmail.com <cgel.zte@gmail.com> [211116 08:28]:
> From: Ye Guojin <ye.guojin@zte.com.cn>
> 
> This was found by coccicheck:
> ./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device;
> call of_find_device_by_node on line 258, but without a corresponding
> object release within this function.
> 
> Move the put_device() call before the if judgment.

Thanks applying into omap-for-v5.17/fixes-not-urgent.

Tony

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

* Re: [PATCH] ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
@ 2021-12-17 12:14   ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2021-12-17 12:14 UTC (permalink / raw)
  To: cgel.zte
  Cc: linux, linux-arm-kernel, linux-omap, linux-kernel, Ye Guojin, Zeal Robot

* cgel.zte@gmail.com <cgel.zte@gmail.com> [211116 08:28]:
> From: Ye Guojin <ye.guojin@zte.com.cn>
> 
> This was found by coccicheck:
> ./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device;
> call of_find_device_by_node on line 258, but without a corresponding
> object release within this function.
> 
> Move the put_device() call before the if judgment.

Thanks applying into omap-for-v5.17/fixes-not-urgent.

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-12-17 12:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  6:27 [PATCH] ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of cgel.zte
2021-11-16  6:27 ` cgel.zte
2021-12-17 12:14 ` Tony Lindgren
2021-12-17 12:14   ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.