Skip to content

Commit

Permalink
drm/vmwgfx: Fix error paths when mapping framebuffer
Browse files Browse the repository at this point in the history
Rather than returning immediately, make sure to unlock the
mutexes first.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reported-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: <stable@vger.kernel.org>
  • Loading branch information
Sinclair Yeh committed Jul 8, 2016
1 parent beca4cf commit 58541f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,15 +589,15 @@ static int vmw_fb_set_par(struct fb_info *info)
ret = vfb->pin(vfb);
if (ret) {
DRM_ERROR("Could not pin the fbdev framebuffer.\n");
return ret;
goto out_unlock;
}

ret = ttm_bo_kmap(&par->vmw_bo->base, 0,
par->vmw_bo->base.num_pages, &par->map);
if (ret) {
vfb->unpin(vfb);
DRM_ERROR("Could not map the fbdev framebuffer.\n");
return ret;
goto out_unlock;
}

par->bo_ptr = ttm_kmap_obj_virtual(&par->map, &par->bo_iowrite);
Expand Down

0 comments on commit 58541f7

Please sign in to comment.