]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/a6xx: avoid shadow NULL reference in failure path
authorJonathan Marek <jonathan@marek.ca>
Thu, 13 May 2021 17:14:00 +0000 (13:14 -0400)
committerRob Clark <robdclark@chromium.org>
Tue, 8 Jun 2021 18:26:45 +0000 (11:26 -0700)
commit839f6c26d7e2d9d3a70aaf7b6c2df29f5ce9163d
tree1b6f581ad8cc51331183e88a37f2da19eaa317f6
parent548a2262030d516a0736aa8d5efcab580169cddf
drm/msm/a6xx: avoid shadow NULL reference in failure path

If a6xx_hw_init() fails before creating the shadow_bo, the a6xx_pm_suspend
code referencing it will crash. Change the condition to one that avoids
this problem (note: creation of shadow_bo is behind this same condition)

Fixes: e6397d7ef860 ("drm/msm/a6xx: Clear shadow on suspend")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Akhil P Oommen <akhilpo@codeaurora.org>
Link: https://lore.kernel.org/r/20210513171431.18632-6-jonathan@marek.ca
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c