Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…chip into drm-next

single rockchip fix.

* 'drm-next' of https://github.com/markyzq/kernel-drm-rockchip:
  drm/rockchip: fix dma_alloc_attrs() error check
  • Loading branch information
Dave Airlie committed Jan 27, 2015
2 parents cc0cc1a + 4b9a90c commit 9e26220
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/gpu/drm/rockchip/rockchip_drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e26220

Please sign in to comment.