linux/drivers/gpu/drm/mediatek
Colin Ian King 972db497be drm/mediatek: avoid dereferencing a null hdmi_phy on an error message
[ Upstream commit b097efba9580d1f7cbc80cda84e768983e3de541 ]

Currently there is a null pointer check for hdmi_phy that implies it
may be null, however a dev_err messages dereferences this potential null
pointer.  Avoid a null pointer dereference by only emitting the dev_err
message if hdmi_phy is non-null.  It is a moot point if the error message
needs to be printed at all, but since this is a relatively new piece of
code it may be useful to keep the message in for the moment in case there
are unforseen errors that need to be reported.

Fixes: be28b6507c ("drm/mediatek: separate hdmi phy to different file")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Dereference after null check")
Link: https://lore.kernel.org/r/20201207150937.170435-1-colin.king@canonical.com
[vkoul: fix indent of return call]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:21 +01:00
..
Kconfig
Makefile
mtk_cec.c
mtk_cec.h
mtk_disp_color.c
mtk_disp_ovl.c
mtk_disp_rdma.c
mtk_dpi.c drm/mediatek: set dpi pin mode to gpio low to avoid leakage current 2020-06-22 09:30:58 +02:00
mtk_dpi_regs.h
mtk_drm_crtc.c drm/mediatek: Find the cursor plane instead of hard coding it 2020-03-25 08:25:42 +01:00
mtk_drm_crtc.h
mtk_drm_ddp.c
mtk_drm_ddp.h
mtk_drm_ddp_comp.c
mtk_drm_ddp_comp.h
mtk_drm_drv.c drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail 2020-09-23 12:40:42 +02:00
mtk_drm_drv.h drm/mediatek: set DMA max segment size 2019-08-15 07:43:46 +08:00
mtk_drm_fb.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
mtk_drm_fb.h
mtk_drm_gem.c
mtk_drm_gem.h
mtk_drm_plane.c drm/mediatek: Check plane visibility in atomic_update 2020-07-16 08:16:37 +02:00
mtk_drm_plane.h
mtk_dsi.c
mtk_hdmi.c drm/mediatek: Add missing put_device() call in mtk_hdmi_dt_parse_pdata() 2020-09-23 12:40:42 +02:00
mtk_hdmi.h
mtk_hdmi_ddc.c
mtk_hdmi_phy.c drm/mediatek: avoid dereferencing a null hdmi_phy on an error message 2020-12-30 11:51:21 +01:00
mtk_hdmi_phy.h
mtk_hdmi_regs.h
mtk_mipi_tx.c
mtk_mt2701_hdmi_phy.c
mtk_mt8173_hdmi_phy.c