mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
drm/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> Cc: <stable@vger.kernel.org>
This commit is contained in:
parent
beca4cf553
commit
58541f7a64
@ -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)
|
|||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user