Skip to contentSkip to conversation

drm/vmwgfx: Fix error paths when mapping framebuffer

PATCH New Sinclair Yeh 1 participant 1 message Jul 7, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: Fix error paths when mapping framebuffer

Rather than returning immediately, make sure to unlock the mutexes first.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +2 -2
index 66eaa30..d2d9395 100644
@@ -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);
Signature · 1 line
2.7.4