diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-12-07 18:09:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 13:53:43 +0300 |
commit | e52398d49d8d20ea93e564ccfa55a814bb08f655 (patch) | |
tree | 40771071cdd36b48b055c3b7c77c36ba3e5ec365 /sound/soc/amd/acp-da7219-max98357a.c | |
parent | 66d1918b2ddb2c45aeb63228e35537e4b5d18005 (diff) | |
download | linux-e52398d49d8d20ea93e564ccfa55a814bb08f655.tar.xz |
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp-da7219-max98357a.c')
0 files changed, 0 insertions, 0 deletions