提交 85035686 编写于 作者: A Alexey Khoroshilov 提交者: Xie XiuQi

video: clps711x-fb: release disp device node in probe()

[ Upstream commit fdac751355cd76e049f628afe6acb8ff4b1399f7 ]

clps711x_fb_probe() increments refcnt of disp device node by
of_parse_phandle() and leaves it undecremented on both
successful and error paths.

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a19c60eb
...@@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device *pdev) ...@@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device *pdev)
} }
ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE); ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE);
if (ret) if (ret) {
of_node_put(disp);
goto out_fb_release; goto out_fb_release;
}
of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale); of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale);
cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert"); cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert");
ret = of_property_read_u32(disp, "bits-per-pixel", ret = of_property_read_u32(disp, "bits-per-pixel",
&info->var.bits_per_pixel); &info->var.bits_per_pixel);
of_node_put(disp);
if (ret) if (ret)
goto out_fb_release; goto out_fb_release;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册