From d4b9efa3b9aa7d4c0e946ecb634154132402158f Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sat, 13 Aug 2016 08:57:23 +0000 Subject: [PATCH] video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info() 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 Acked-by: Robert Jarzmik Signed-off-by: Tomi Valkeinen --- 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 ed41fdb42d13..ef73f14d7ba0 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; }