diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-28 05:51:44 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-05-31 14:54:04 -0400 |
commit | 56b085a01befc7907d270e9acb349580015e7bad (patch) | |
tree | dd543633d5f98e02764888391c3de28aab3eff06 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 6b1c087ba5789aceb25a2170b217055ce2476f67 (diff) |
drm/i915: fix error return code in init_pipe_control()
Fix to return -ENOMEM in the kmap() error handling case
instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 5698faeee6f6..9b97cf66a5ae 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -464,9 +464,11 @@ init_pipe_control(struct intel_ring_buffer *ring) | |||
464 | goto err_unref; | 464 | goto err_unref; |
465 | 465 | ||
466 | pc->gtt_offset = obj->gtt_offset; | 466 | pc->gtt_offset = obj->gtt_offset; |
467 | pc->cpu_page = kmap(sg_page(obj->pages->sgl)); | 467 | pc->cpu_page = kmap(sg_page(obj->pages->sgl)); |
468 | if (pc->cpu_page == NULL) | 468 | if (pc->cpu_page == NULL) { |
469 | ret = -ENOMEM; | ||
469 | goto err_unpin; | 470 | goto err_unpin; |
471 | } | ||
470 | 472 | ||
471 | DRM_DEBUG_DRIVER("%s pipe control offset: 0x%08x\n", | 473 | DRM_DEBUG_DRIVER("%s pipe control offset: 0x%08x\n", |
472 | ring->name, pc->gtt_offset); | 474 | ring->name, pc->gtt_offset); |