diff options
author | Sinclair Yeh <syeh@vmware.com> | 2016-07-05 09:01:34 -0700 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2016-07-05 10:38:15 -0700 |
commit | 115ae1f76287776e64f1d029d764f193a62c6267 (patch) | |
tree | 8a0a4ba2fbd8c7e7ec02289a588948786573fe93 /vmwgfx_fb.c | |
parent | a86b414aed63431788a5f35c3a7499347fe0e887 (diff) |
vmwgfx: Fix error paths when mapping framebuffer
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>
Diffstat (limited to 'vmwgfx_fb.c')
-rw-r--r-- | vmwgfx_fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vmwgfx_fb.c b/vmwgfx_fb.c index c9f8060..b638edd 100644 --- a/vmwgfx_fb.c +++ b/vmwgfx_fb.c @@ -615,7 +615,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, @@ -623,7 +623,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); |