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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}