diff options
author | Rob Clark <robdclark@gmail.com> | 2016-05-24 18:29:38 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-06-04 14:45:48 -0400 |
commit | 69a834c28fb514403eb91a4f0120da214a52e056 (patch) | |
tree | 718733cb1bdaea6feb4a831e14838d03d19ef85c /drivers/gpu/drm/msm/msm_ringbuffer.c | |
parent | ab3ab68493aaac6fea4ad1bb597def9f48f41c71 (diff) | |
download | op-kernel-dev-69a834c28fb514403eb91a4f0120da214a52e056.zip op-kernel-dev-69a834c28fb514403eb91a4f0120da214a52e056.tar.gz |
drm/msm: deal with exhausted vmap space better
Some, but not all, callers of obj->vmap() would check if return
IS_ERR(). So let's actually return an error if vmap() fails. And fixup
the call-sites that were not handling this properly.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_ringbuffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c index 1f14b90..42f5359 100644 --- a/drivers/gpu/drm/msm/msm_ringbuffer.c +++ b/drivers/gpu/drm/msm/msm_ringbuffer.c @@ -40,6 +40,10 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int size) } ring->start = msm_gem_vaddr_locked(ring->bo); + if (IS_ERR(ring->start)) { + ret = PTR_ERR(ring->start); + goto fail; + } ring->end = ring->start + (size / 4); ring->cur = ring->start; |