Skip to content

Commit f9d1b52

Browse files
Dan Carpenterlumag
authored andcommitted
drm/msm/dpu: fix error pointer dereference in msm_kms_init_aspace()
If msm_gem_address_space_create() fails, then return right away. Otherwise it leads to a Oops when we dereference "aspace" on the next line. Fixes: eabba31 ("drm/msm: register a fault handler for display mmu faults") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/639357/ Link: https://lore.kernel.org/r/[email protected] [DB: fixed commit id] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent ea54cfa commit f9d1b52

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/msm/msm_kms.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
209209
if (IS_ERR(aspace)) {
210210
dev_err(mdp_dev, "aspace create, error %pe\n", aspace);
211211
mmu->funcs->destroy(mmu);
212+
return aspace;
212213
}
213214

214215
msm_mmu_set_fault_handler(aspace->mmu, kms, msm_kms_fault_handler);

0 commit comments

Comments
 (0)