* [PATCH] drm/mediatek: fix uninitialized symbol
@ 2023-04-20 10:51 Nancy.Lin
2023-04-20 12:01 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 3+ messages in thread
From: Nancy.Lin @ 2023-04-20 10:51 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: David Airlie, Daniel Vetter, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel, clang-built-linux,
Project_Global_Chrome_Upstream_Group, singo.chang, Nancy.Lin
fix Smatch static checker warning
- uninitialized symbol comp_pdev in mtk_ddp_comp_init.
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
---
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
index f114da4d36a9..e987ac4481bc 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
@@ -546,7 +546,7 @@ unsigned int mtk_drm_find_possible_crtc_by_comp(struct drm_device *drm,
int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
unsigned int comp_id)
{
- struct platform_device *comp_pdev;
+ struct platform_device *comp_pdev = NULL;
enum mtk_ddp_comp_type type;
struct mtk_ddp_comp_dev *priv;
#if IS_REACHABLE(CONFIG_MTK_CMDQ)
@@ -588,6 +588,9 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
type == MTK_DSI)
return 0;
+ if (!comp_pdev)
+ return -EPROBE_DEFER;
+
priv = devm_kzalloc(comp->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/mediatek: fix uninitialized symbol
2023-04-20 10:51 [PATCH] drm/mediatek: fix uninitialized symbol Nancy.Lin
@ 2023-04-20 12:01 ` AngeloGioacchino Del Regno
2023-04-21 2:11 ` Nancy Lin (林欣螢)
0 siblings, 1 reply; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-04-20 12:01 UTC (permalink / raw)
To: Nancy.Lin, Chun-Kuang Hu, Philipp Zabel, Matthias Brugger
Cc: David Airlie, Daniel Vetter, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel, clang-built-linux,
Project_Global_Chrome_Upstream_Group, singo.chang
Il 20/04/23 12:51, Nancy.Lin ha scritto:
> fix Smatch static checker warning
> - uninitialized symbol comp_pdev in mtk_ddp_comp_init.
>
> Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
I agree with this commit, but please add a Fixes tag.
Thanks,
Angelo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/mediatek: fix uninitialized symbol
2023-04-20 12:01 ` AngeloGioacchino Del Regno
@ 2023-04-21 2:11 ` Nancy Lin (林欣螢)
0 siblings, 0 replies; 3+ messages in thread
From: Nancy Lin (林欣螢) @ 2023-04-21 2:11 UTC (permalink / raw)
To: p.zabel@pengutronix.de, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com, chunkuang.hu@kernel.org
Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Singo Chang (張興國), daniel@ffwll.ch,
dri-devel@lists.freedesktop.org,
Project_Global_Chrome_Upstream_Group, airlied@gmail.com,
clang-built-linux@googlegroups.com,
linux-arm-kernel@lists.infradead.org
Hi Angelo,
On Thu, 2023-04-20 at 14:01 +0200, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Il 20/04/23 12:51, Nancy.Lin ha scritto:
> > fix Smatch static checker warning
> > - uninitialized symbol comp_pdev in mtk_ddp_comp_init.
> >
> > Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
>
> I agree with this commit, but please add a Fixes tag.
>
> Thanks,
> Angelo
Thanks for the review. I will resend it with Fixes tag.
Regards,
Nancy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-21 2:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 10:51 [PATCH] drm/mediatek: fix uninitialized symbol Nancy.Lin
2023-04-20 12:01 ` AngeloGioacchino Del Regno
2023-04-21 2:11 ` Nancy Lin (林欣螢)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox