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
|
@ -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 New Issue