msm: kgsl: Correctly handle page allocation failure
If we fail on the first page allocation iteration in
_kgsl_sharedmem_page_alloc then sglen will be 0. Do not blindly
set sg_mark_end() on sg[sglen - 1] without verifying that we
allocated at least one block. We can also skip iterating the
sglist when freeing if sglen is 0.
CRs-Fixed: 771199
Change-Id: Ic0dedbad22c88c1f9efccffddaf266a9a9af4b08
Signed-off-by:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment