]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/msm: Fix potential Oops in a6xx_gmu_rpmh_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 Oct 2021 13:45:30 +0000 (16:45 +0300)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:22 +0000 (09:48 +0100)
commite2cc4a6c78ccf27cdadbccc9af82ef3ea0aaf276
treeab72e0e633f7c7f87538d851c259fb92f2b78957
parenta249caba7dd6eefbfc4b2e0d25a423e73b27d7b0
drm/msm: Fix potential Oops in a6xx_gmu_rpmh_init()

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 3d91e50ff58364f6572ad268b508175d27800e51 ]

There are two problems here:
1) The "seqptr" is used uninitalized when we free it at the end.
2) The a6xx_gmu_get_mmio() function returns error pointers.  It never
   returns true.

Fixes: 64245fc55172 ("drm/msm/a6xx: use AOP-initialized PDC for a650")
Fixes: f8fc924e088e ("drm/msm/a6xx: Fix PDC register overlap")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211004134530.GB11689@kili
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c