|
|
@@ -890,7 +890,8 @@ static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,
|
|
|
ret = vmw_user_dmabuf_lookup(sw_context->fp->tfile, handle, &vmw_bo);
|
|
|
if (unlikely(ret != 0)) {
|
|
|
DRM_ERROR("Could not find or use MOB buffer.\n");
|
|
|
- return -EINVAL;
|
|
|
+ ret = -EINVAL;
|
|
|
+ goto out_no_reloc;
|
|
|
}
|
|
|
bo = &vmw_bo->base;
|
|
|
|
|
|
@@ -914,7 +915,7 @@ static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,
|
|
|
|
|
|
out_no_reloc:
|
|
|
vmw_dmabuf_unreference(&vmw_bo);
|
|
|
- vmw_bo_p = NULL;
|
|
|
+ *vmw_bo_p = NULL;
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -951,7 +952,8 @@ static int vmw_translate_guest_ptr(struct vmw_private *dev_priv,
|
|
|
ret = vmw_user_dmabuf_lookup(sw_context->fp->tfile, handle, &vmw_bo);
|
|
|
if (unlikely(ret != 0)) {
|
|
|
DRM_ERROR("Could not find or use GMR region.\n");
|
|
|
- return -EINVAL;
|
|
|
+ ret = -EINVAL;
|
|
|
+ goto out_no_reloc;
|
|
|
}
|
|
|
bo = &vmw_bo->base;
|
|
|
|
|
|
@@ -974,7 +976,7 @@ static int vmw_translate_guest_ptr(struct vmw_private *dev_priv,
|
|
|
|
|
|
out_no_reloc:
|
|
|
vmw_dmabuf_unreference(&vmw_bo);
|
|
|
- vmw_bo_p = NULL;
|
|
|
+ *vmw_bo_p = NULL;
|
|
|
return ret;
|
|
|
}
|
|
|
|