summaryrefslogtreecommitdiffstats
path: root/ipc/util.h
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-12-07 15:09:37 +0000
committerVinod Koul <vkoul@kernel.org>2020-12-08 18:26:02 +0530
commitb097efba9580d1f7cbc80cda84e768983e3de541 (patch)
tree512897539c0b465e1d3446b6a8d6505f338d081a /ipc/util.h
parent1dfd7b7849ea8bdbbe26d280d7b43c4ae66e730f (diff)
downloadlinux-b097efba9580d1f7cbc80cda84e768983e3de541.tar.bz2
drm/mediatek: avoid dereferencing a null hdmi_phy on an error message
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: be28b6507c46 ("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>
Diffstat (limited to 'ipc/util.h')
0 files changed, 0 insertions, 0 deletions