msm: kgsl: Deal with a NULL pointer when creating default pagetable

Return an appropriate error code if the default pagetable is NULL.

Change-Id: Ic88b066c40a8f840d95fd3fbc9ee9274c428b66a
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
This commit is contained in:
Lynus Vaz 2017-04-17 18:29:58 +05:30 committed by Gerrit - the friendly Code Review server
parent a2ab165607
commit 5ea16d78cc

View file

@ -1547,6 +1547,8 @@ static int _setup_user_context(struct kgsl_mmu *mmu)
ret = PTR_ERR(mmu->defaultpagetable);
mmu->defaultpagetable = NULL;
return ret;
} else if (mmu->defaultpagetable == NULL) {
return -ENOMEM;
}
}