diff options
author | Lv Ruyi <lv.ruyi@zte.com.cn> | 2022-04-07 12:01:22 +0300 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-04-07 22:40:37 +0300 |
commit | 836ffc47fa245e58cae51ac40c5ef71be8f4d480 (patch) | |
tree | 3b17d77396d92a5973002d15390175c5e9e0378b /drivers/video/fbdev/imxfb.c | |
parent | 7e4920bf59cb085e148796e937a8e8212fd2bae0 (diff) | |
download | linux-836ffc47fa245e58cae51ac40c5ef71be8f4d480.tar.xz |
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>
Diffstat (limited to 'drivers/video/fbdev/imxfb.c')
-rw-r--r-- | drivers/video/fbdev/imxfb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 68288756ffff..a2f644c97f28 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -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; } |