提交 58541f7a 编写于 作者: S Sinclair Yeh

drm/vmwgfx: Fix error paths when mapping framebuffer

Rather than returning immediately, make sure to unlock the
mutexes first.
Signed-off-by: NSinclair Yeh <syeh@vmware.com>
Reviewed-by: NCharmaine Lee <charmainel@vmware.com>
Reported-by: NEmil Velikov <emil.l.velikov@gmail.com>
Cc: <stable@vger.kernel.org>
上级 beca4cf5
...@@ -589,7 +589,7 @@ static int vmw_fb_set_par(struct fb_info *info) ...@@ -589,7 +589,7 @@ static int vmw_fb_set_par(struct fb_info *info)
ret = vfb->pin(vfb); ret = vfb->pin(vfb);
if (ret) { if (ret) {
DRM_ERROR("Could not pin the fbdev framebuffer.\n"); DRM_ERROR("Could not pin the fbdev framebuffer.\n");
return ret; goto out_unlock;
} }
ret = ttm_bo_kmap(&par->vmw_bo->base, 0, ret = ttm_bo_kmap(&par->vmw_bo->base, 0,
...@@ -597,7 +597,7 @@ static int vmw_fb_set_par(struct fb_info *info) ...@@ -597,7 +597,7 @@ static int vmw_fb_set_par(struct fb_info *info)
if (ret) { if (ret) {
vfb->unpin(vfb); vfb->unpin(vfb);
DRM_ERROR("Could not map the fbdev framebuffer.\n"); 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); par->bo_ptr = ttm_kmap_obj_virtual(&par->map, &par->bo_iowrite);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册