Skip to contentSkip to conversation

gpu: do not double put device node in zx_drm_probe

PATCH In review zhong jiang 4 participants 10 messages Aug 17, 2018 – Sep 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: do not double put device node in zx_drm_probe

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -3
index 6f4205e8..d7b9870 100644
@@ -161,10 +161,8 @@ static int zx_drm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	for_each_available_child_of_node(parent, child) {
+	for_each_available_child_of_node(parent, child)
 		component_match_add(dev, &match, compare_of, child);
-		of_node_put(child);
-	}
 
 	return component_master_add_with_match(dev, &zx_drm_master_ops, match);
 }
Signature · 1 line
1.7.12.4
#1 lore raw

Ping, Anyone has any objections a about the patch?

Best wishes,
zhong jiang

Quoted 25 lines · zhong jiang

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -3
index 6f4205e8..d7b9870 100644
@@ -161,10 +161,8 @@ static int zx_drm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	for_each_available_child_of_node(parent, child) {
+	for_each_available_child_of_node(parent, child)
 		component_match_add(dev, &match, compare_of, child);
-		of_node_put(child);
-	}
 
 	return component_master_add_with_match(dev, &zx_drm_master_ops, match);
 }
#3 lore raw
Quoted 8 lines · Shawn Guo
Quoted 5 lines · zhong jiang

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

Shawn, I'm assuming you'll push this to drm-misc-next? You're the maintainer with commit rights after all.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Shawn Guo
Quoted 4 lines · zhong jiang

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Shawn, I'm assuming you'll push this to drm-misc-next? You're the maintainer with commit rights after all.

Just pushed to drm-misc-next. Sorry for the delay.

Shawn

#5 lore raw
In reply to zhong jiang

+to maintainer.

Quoted 25 lines · zhong jiang

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -3
index 6f4205e8..d7b9870 100644
@@ -161,10 +161,8 @@ static int zx_drm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	for_each_available_child_of_node(parent, child) {
+	for_each_available_child_of_node(parent, child)
 		component_match_add(dev, &match, compare_of, child);
-		of_node_put(child);
-	}
 
 	return component_master_add_with_match(dev, &zx_drm_master_ops, match);
 }
#6 lore raw
In reply to zhong jiang

Hi, Greg

Can you pick up the patch?

Thanks,
zhong jiang

Quoted 25 lines · zhong jiang

for_each_available_child_of_node will get and put the node properly, the following of_node_put will lead to the double put. So just remove it.

---
 drivers/gpu/drm/zte/zx_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/zte/zx_drm_drv.c +1 -3
index 6f4205e8..d7b9870 100644
@@ -161,10 +161,8 @@ static int zx_drm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	for_each_available_child_of_node(parent, child) {
+	for_each_available_child_of_node(parent, child)
 		component_match_add(dev, &match, compare_of, child);
-		of_node_put(child);
-	}
 
 	return component_master_add_with_match(dev, &zx_drm_master_ops, match);
 }
#7 lore raw
Quoted 3 lines · zhong jiang

Hi, Greg

Can you pick up the patch?

Nope:

$ ./scripts/get_maintainer.pl --file drivers/gpu/drm/zte/zx_drm_drv.c
Shawn Guo <[email protected]> (maintainer:DRM DRIVERS FOR ZTE ZX)
David Airlie <[email protected]> (maintainer:DRM DRIVERS)
[email protected] (open list:DRM DRIVERS FOR ZTE ZX)
[email protected] (open list)

why would I take thi when all of those others are the correct maintainers?

Also, you only posted this 1 day ago. Please relax and give people time and a chance to review your patch. It is not instant.

thanks,

greg k-h
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
Quoted 11 lines · Greg KH
Quoted 3 lines · zhong jiang

Hi, Greg

Can you pick up the patch?

Nope:

$ ./scripts/get_maintainer.pl --file drivers/gpu/drm/zte/zx_drm_drv.c
Shawn Guo <[email protected]> (maintainer:DRM DRIVERS FOR ZTE ZX)
David Airlie <[email protected]> (maintainer:DRM DRIVERS)
[email protected] (open list:DRM DRIVERS FOR ZTE ZX)
[email protected] (open list)
Quoted 5 lines

why would I take thi when all of those others are the correct maintainers?

Also, you only posted this 1 day ago. Please relax and give people time and a chance to review your patch. It is not instant.

No, I posted the patch a month ago. I have sent a ping. but It do not work. :-( .

Thanks,
zhong jiang

Quoted 6 lines

thanks,

greg k-h

.

#9 lore raw
In reply to Greg KH
Quoted 12 lines · Greg KH
Quoted 3 lines · zhong jiang

Hi, Greg

Can you pick up the patch?

Nope:

$ ./scripts/get_maintainer.pl --file drivers/gpu/drm/zte/zx_drm_drv.c
Shawn Guo <[email protected]> (maintainer:DRM DRIVERS FOR ZTE ZX)
David Airlie <[email protected]> (maintainer:DRM DRIVERS)
[email protected] (open list:DRM DRIVERS FOR ZTE ZX)
[email protected] (open list)
Quoted 5 lines

why would I take thi when all of those others are the correct maintainers?

Also, you only posted this 1 day ago. Please relax and give people time and a chance to review your patch. It is not instant.

First submission was in August, acked by Shawn, but somehow they forgot to actually push the patch out. I pinged Shawn.

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch