[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220407090122.2491922-1-lv.ruyi@zte.com.cn>
Date: Thu, 7 Apr 2022 09:01:22 +0000
From: cgel.zte@...il.com
To: s.hauer@...gutronix.de, kernel@...gutronix.de
Cc: deller@....de, shawnguo@...nel.org, festevam@...il.com,
linux-imx@....com, linux-fbdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Lv Ruyi <lv.ruyi@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: [PATCH] video: fbdev: Fix missing of_node_put in imxfb_probe
From: Lv Ruyi <lv.ruyi@....com.cn>
of_parse_phandle returns node pointer with refcount incremented,
use of_node_put() on it when done.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
---
drivers/video/fbdev/imxfb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 68288756ffff..a2f644c97f28 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev)
sizeof(struct imx_fb_videomode), GFP_KERNEL);
if (!fbi->mode) {
ret = -ENOMEM;
+ of_node_put(display_np);
goto failed_of_parse;
}
ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode);
+ of_node_put(display_np);
if (ret)
goto failed_of_parse;
}
--
2.25.1
Powered by blists - more mailing lists