mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 20:34:23 -04:00
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>
This commit is contained in:
committed by
Daniel Vetter
parent
6b1c087ba5
commit
56b085a01b
@@ -464,9 +464,11 @@ init_pipe_control(struct intel_ring_buffer *ring)
|
||||
goto err_unref;
|
||||
|
||||
pc->gtt_offset = obj->gtt_offset;
|
||||
pc->cpu_page = kmap(sg_page(obj->pages->sgl));
|
||||
if (pc->cpu_page == NULL)
|
||||
pc->cpu_page = kmap(sg_page(obj->pages->sgl));
|
||||
if (pc->cpu_page == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unpin;
|
||||
}
|
||||
|
||||
DRM_DEBUG_DRIVER("%s pipe control offset: 0x%08x\n",
|
||||
ring->name, pc->gtt_offset);
|
||||
|
||||
Reference in New Issue
Block a user