[PATCH -next] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info()

Subsystems: framebuffer layer, the rest

STALE3653d

3 messages, 3 authors, 2016-08-30 · open the first message on its own page

[PATCH -next] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info()

From: Wei Yongjun <hidden>
Date: 2016-08-13 08:57:23

This node pointer is returned by of_graph_get_next_endpoint() with
refcount incremented in this function. of_node_put() on it before
exitting this function.

Found by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
---
 drivers/video/fbdev/pxafb.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index ed41fdb..ef73f14 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2186,6 +2186,7 @@ static int of_get_pxafb_mode_info(struct device *dev,
 	ret = of_property_read_u32(np, "bus-width", &bus_width);
 	if (ret) {
 		dev_err(dev, "no bus-width specified: %d\n", ret);
+		of_node_put(np);
 		return ret;
 	}

Re: [PATCH -next] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info()

From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: 2016-08-13 09:40:48

Wei Yongjun [off-list ref] writes:
This node pointer is returned by of_graph_get_next_endpoint() with
refcount incremented in this function. of_node_put() on it before
exitting this function.

Found by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert

Re: [PATCH -next] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info()

From: Tomi Valkeinen <hidden>
Date: 2016-08-30 09:04:58


On 13/08/16 11:57, Wei Yongjun wrote:
quoted hunk
This node pointer is returned by of_graph_get_next_endpoint() with
refcount incremented in this function. of_node_put() on it before
exitting this function.

Found by Coccinelle.

Signed-off-by: Wei Yongjun <redacted>
---
 drivers/video/fbdev/pxafb.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index ed41fdb..ef73f14 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2186,6 +2186,7 @@ static int of_get_pxafb_mode_info(struct device *dev,
 	ret = of_property_read_u32(np, "bus-width", &bus_width);
 	if (ret) {
 		dev_err(dev, "no bus-width specified: %d\n", ret);
+		of_node_put(np);
 		return ret;
 	}
Thanks, queued for 4.9.

 Tomi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help