Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup

of_parse_phandle() returns a node pointer with refcount incremented, we should
use of_node_put() on it when not need anymore. Add missing of_node_put() to
avoid refcount leak.

Fixes: d10715be03bd ("video: ARM CLCD: Add DT support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Miaoqian Lin and committed by
Helge Deller
b23789a5 c4b4d704

+4 -1
+4 -1
drivers/video/fbdev/amba-clcd.c
··· 758 758 return -ENODEV; 759 759 760 760 fb->fb.screen_base = of_iomap(memory, 0); 761 - if (!fb->fb.screen_base) 761 + if (!fb->fb.screen_base) { 762 + of_node_put(memory); 762 763 return -ENOMEM; 764 + } 763 765 764 766 fb->fb.fix.smem_start = of_translate_address(memory, 765 767 of_get_address(memory, 0, &size, NULL)); 766 768 fb->fb.fix.smem_len = size; 769 + of_node_put(memory); 767 770 768 771 return 0; 769 772 }