Skip to content

Commit 63ee943

Browse files
Nancy.LinChun-Kuang Hu
authored andcommitted
drm/mediatek: Fix uninitialized symbol
Fix Smatch static checker warning -Fix uninitialized symbol comp_pdev in mtk_ddp_comp_init. Fixes: 0d9eee9 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195") Signed-off-by: Nancy.Lin <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 06c2afb commit 63ee943

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,14 +563,15 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
563563
/* Not all drm components have a DTS device node, such as ovl_adaptor,
564564
* which is the drm bring up sub driver
565565
*/
566-
if (node) {
567-
comp_pdev = of_find_device_by_node(node);
568-
if (!comp_pdev) {
569-
DRM_INFO("Waiting for device %s\n", node->full_name);
570-
return -EPROBE_DEFER;
571-
}
572-
comp->dev = &comp_pdev->dev;
566+
if (!node)
567+
return 0;
568+
569+
comp_pdev = of_find_device_by_node(node);
570+
if (!comp_pdev) {
571+
DRM_INFO("Waiting for device %s\n", node->full_name);
572+
return -EPROBE_DEFER;
573573
}
574+
comp->dev = &comp_pdev->dev;
574575

575576
if (type == MTK_DISP_AAL ||
576577
type == MTK_DISP_BLS ||
@@ -580,7 +581,6 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
580581
type == MTK_DISP_MERGE ||
581582
type == MTK_DISP_OVL ||
582583
type == MTK_DISP_OVL_2L ||
583-
type == MTK_DISP_OVL_ADAPTOR ||
584584
type == MTK_DISP_PWM ||
585585
type == MTK_DISP_RDMA ||
586586
type == MTK_DPI ||

0 commit comments

Comments
 (0)