drm/mediatek: Fix uninitialized symbol
Fix Smatch static checker warning
-Fix uninitialized symbol comp_pdev in mtk_ddp_comp_init.
Fixes: 0d9eee9118
("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195")
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230803094843.4439-1-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
06c2afb862
commit
63ee9438f2
|
@ -563,14 +563,15 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
|
||||||
/* Not all drm components have a DTS device node, such as ovl_adaptor,
|
/* Not all drm components have a DTS device node, such as ovl_adaptor,
|
||||||
* which is the drm bring up sub driver
|
* which is the drm bring up sub driver
|
||||||
*/
|
*/
|
||||||
if (node) {
|
if (!node)
|
||||||
|
return 0;
|
||||||
|
|
||||||
comp_pdev = of_find_device_by_node(node);
|
comp_pdev = of_find_device_by_node(node);
|
||||||
if (!comp_pdev) {
|
if (!comp_pdev) {
|
||||||
DRM_INFO("Waiting for device %s\n", node->full_name);
|
DRM_INFO("Waiting for device %s\n", node->full_name);
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
}
|
}
|
||||||
comp->dev = &comp_pdev->dev;
|
comp->dev = &comp_pdev->dev;
|
||||||
}
|
|
||||||
|
|
||||||
if (type == MTK_DISP_AAL ||
|
if (type == MTK_DISP_AAL ||
|
||||||
type == MTK_DISP_BLS ||
|
type == MTK_DISP_BLS ||
|
||||||
|
@ -580,7 +581,6 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
|
||||||
type == MTK_DISP_MERGE ||
|
type == MTK_DISP_MERGE ||
|
||||||
type == MTK_DISP_OVL ||
|
type == MTK_DISP_OVL ||
|
||||||
type == MTK_DISP_OVL_2L ||
|
type == MTK_DISP_OVL_2L ||
|
||||||
type == MTK_DISP_OVL_ADAPTOR ||
|
|
||||||
type == MTK_DISP_PWM ||
|
type == MTK_DISP_PWM ||
|
||||||
type == MTK_DISP_RDMA ||
|
type == MTK_DISP_RDMA ||
|
||||||
type == MTK_DPI ||
|
type == MTK_DPI ||
|
||||||
|
|
Loading…
Reference in New Issue