Commit ed71c68b authored by Sinclair Yeh's avatar Sinclair Yeh Committed by Greg Kroah-Hartman

drm/vmwgfx: Fix error paths when mapping framebuffer

commit 58541f7a upstream.

Rather than returning immediately, make sure to unlock the
mutexes first.
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarCharmaine Lee <charmainel@vmware.com>
Reported-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82c882cc
......@@ -589,7 +589,7 @@ 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,
......@@ -597,7 +597,7 @@ static int vmw_fb_set_par(struct fb_info *info)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment