video: fbdev: imxfb: Fix missing of_node_put in imxfb_probe

of_parse_phandle returns node pointer with refcount incremented,
use of_node_put() on it when done.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Lv Ruyi 2022-04-07 09:01:22 +00:00 committed by Helge Deller
parent 7e4920bf59
commit 836ffc47fa

View file

@ -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;
}