OSDN Git Service

msm: kgsl: Correct dma_buf_get function return value check
authorDeepak Kumar <dkumar@codeaurora.org>
Tue, 7 Jun 2016 10:02:15 +0000 (15:32 +0530)
committerCarter Cooper <ccooper@codeaurora.org>
Wed, 3 Aug 2016 16:34:04 +0000 (10:34 -0600)
commit7996822bbce7a8fe70eeca22baa52eb4eaeeabbe
tree6b073b6cf0968b30c8288327ab06e25fe23bcfaa
parentda3193916d5e4526d659c950f3f0dea92273bc5a
msm: kgsl: Correct dma_buf_get function return value check

Check the return value of dma_buf_get function using
IS_ERR_OR_NULL as dma_buf_get function can return
ERR_PTR(-EINVAL) which won't be caught by simple NULL
check. This will avoid kernel panic due to invalid
pointer access.

CRs-Fixed: 1008517
Change-Id: I11ebf618edd25a251d3fb8bb7fbbb886e10d788f
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
drivers/gpu/msm/kgsl.c