Commit 836ffc47 authored by Lv Ruyi's avatar Lv Ruyi Committed by Helge Deller

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarLv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 7e4920bf
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment