drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()
Subsystems (4)
PATCH v2 1/1 drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()
It's allocating an array of a6xx_gpu_state_obj structure rather than its pointers.
Fixes d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory")
Signed-off-by Zhenzhong Duan <[email protected]>
---
v2: Update commit message per Markus, thanks
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +1 -1
@@ -875,7 +875,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,int i; a6xx_state->indexed_regs =state_kcalloc (a6xx_state, count, -sizeof (a6xx_state->indexed_regs)); +sizeof (*a6xx_state->indexed_regs));if (!a6xx_state->indexed_regs)return ;
Signature · 1 line
1.8.3.1
Quoted 5 lines · Zhenzhong Duan
It's allocating an array of
a6xx_gpu_state_objstructure rather than its pointers.Fixes d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory")Signed-off-by Zhenzhong Duan <[email protected]>
Reviewed-by Jordan Crouse <[email protected]>
Quoted 22 lines
---
v2: Update commit message per Markus, thanksdrivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +1
-1@@ -875,7 +875,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,int i; a6xx_state->indexed_regs =state_kcalloc (a6xx_state, count, -sizeof (a6xx_state->indexed_regs)); +sizeof (*a6xx_state->indexed_regs));if (!a6xx_state->indexed_regs)return ;Signature · 1 line
1.8.3.1
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project