mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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:
parent
7e4920bf59
commit
836ffc47fa
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue