mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/vmwgfx: Fix some static checker warnings
Fix some minor issues that Coverity spotted in the code. None of that are serious but they're all valid concerns so fixing them makes sense. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210609172307.131929-5-zackr@vmware.com
This commit is contained in:
@@ -114,6 +114,7 @@ static void vmw_resource_release(struct kref *kref)
|
||||
container_of(kref, struct vmw_resource, kref);
|
||||
struct vmw_private *dev_priv = res->dev_priv;
|
||||
int id;
|
||||
int ret;
|
||||
struct idr *idr = &dev_priv->res_idr[res->func->res_type];
|
||||
|
||||
spin_lock(&dev_priv->resource_lock);
|
||||
@@ -122,7 +123,8 @@ static void vmw_resource_release(struct kref *kref)
|
||||
if (res->backup) {
|
||||
struct ttm_buffer_object *bo = &res->backup->base;
|
||||
|
||||
ttm_bo_reserve(bo, false, false, NULL);
|
||||
ret = ttm_bo_reserve(bo, false, false, NULL);
|
||||
BUG_ON(ret);
|
||||
if (vmw_resource_mob_attached(res) &&
|
||||
res->func->unbind != NULL) {
|
||||
struct ttm_validate_buffer val_buf;
|
||||
@@ -1001,7 +1003,9 @@ int vmw_resource_pin(struct vmw_resource *res, bool interruptible)
|
||||
if (res->backup) {
|
||||
vbo = res->backup;
|
||||
|
||||
ttm_bo_reserve(&vbo->base, interruptible, false, NULL);
|
||||
ret = ttm_bo_reserve(&vbo->base, interruptible, false, NULL);
|
||||
if (ret)
|
||||
goto out_no_validate;
|
||||
if (!vbo->base.pin_count) {
|
||||
ret = ttm_bo_validate
|
||||
(&vbo->base,
|
||||
|
||||
Reference in New Issue
Block a user