linux_dsm_epyc7002/drivers/phy/mediatek
Colin Ian King e52398d49d 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:53:43 +01:00
..
Kconfig phy: mediatek: allow compile-testing the hdmi phy 2020-12-30 11:53:36 +01:00
Makefile phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder 2020-09-06 07:03:21 +08:00
phy-mtk-hdmi-mt2701.c drm/mediatek: Disable tmds on mt2701 2020-09-14 23:05:23 +08:00
phy-mtk-hdmi-mt8173.c phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder 2020-09-06 07:03:21 +08:00
phy-mtk-hdmi.c drm/mediatek: avoid dereferencing a null hdmi_phy on an error message 2020-12-30 11:53:43 +01:00
phy-mtk-hdmi.h drm/mediatek: Disable tmds on mt2701 2020-09-14 23:05:23 +08:00
phy-mtk-tphy.c phy: phy-mtk-tphy: add a new reference clock 2020-03-20 19:34:29 +05:30
phy-mtk-ufs.c scsi: phy: mediatek: fix typo in author's email address 2019-04-18 22:08:25 +05:30
phy-mtk-xsphy.c phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30