diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-27 01:05:44 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-01-27 01:05:44 +0100 |
commit | 9e26220286dc79eeeef25de138b144fde3d41a85 (patch) | |
tree | 068bc49ee9d9d2c1bb187522aae21d2a7cb8a4fe /drivers/gpu/drm/rockchip | |
parent | Merge branch 'drm-next-3.20' of git://people.freedesktop.org/~agd5f/linux int... (diff) | |
parent | drm/rockchip: fix dma_alloc_attrs() error check (diff) | |
download | linux-9e26220286dc79eeeef25de138b144fde3d41a85.tar.xz linux-9e26220286dc79eeeef25de138b144fde3d41a85.zip |
Merge branch 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip into drm-next
single rockchip fix.
* 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip:
drm/rockchip: fix dma_alloc_attrs() error check
Diffstat (limited to 'drivers/gpu/drm/rockchip')
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index bc98a227dc76..7ca8799ef784 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -34,12 +34,9 @@ static int rockchip_gem_alloc_buf(struct rockchip_gem_object *rk_obj) rk_obj->kvaddr = dma_alloc_attrs(drm->dev, obj->size, &rk_obj->dma_addr, GFP_KERNEL, &rk_obj->dma_attrs); - if (IS_ERR(rk_obj->kvaddr)) { - int ret = PTR_ERR(rk_obj->kvaddr); - - DRM_ERROR("failed to allocate %#x byte dma buffer, %d", - obj->size, ret); - return ret; + if (!rk_obj->kvaddr) { + DRM_ERROR("failed to allocate %#x byte dma buffer", obj->size); + return -ENOMEM; } return 0; |