diff options
author | Rob Clark <robdclark@gmail.com> | 2016-05-25 00:29:38 +0200 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-06-04 20:45:48 +0200 |
commit | 69a834c28fb514403eb91a4f0120da214a52e056 (patch) | |
tree | 718733cb1bdaea6feb4a831e14838d03d19ef85c /drivers/gpu/drm/msm/msm_ringbuffer.c | |
parent | drm/omap: fix unused variable warning. (diff) | |
download | linux-69a834c28fb514403eb91a4f0120da214a52e056.tar.xz linux-69a834c28fb514403eb91a4f0120da214a52e056.zip |
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 1f14b908b221..42f5359cf988 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; |