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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:33 +0000 (19:16 +0100)
commitc14f0035476fab52d2763d75ccf0e71c29aa4ee0
tree8f71ccc2050a4178e394a3f83852ddce3531845e
parentdafe75a9a6dc661841ff51f01eae5bed73653570
drm/msm: Fix potential Oops in a6xx_gmu_rpmh_init()

[ 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>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c