[bug report] drm/vmwgfx: Implement DRIVER_GEM
Dan Carpenter
dan.carpenter at oracle.com
Wed Dec 15 11:20:57 UTC 2021
Hello Zack Rusin,
The patch 8afa13a0583f: "drm/vmwgfx: Implement DRIVER_GEM" from Dec
6, 2021, leads to the following Smatch static checker warning:
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:574 vmw_user_bo_synccpu_release()
error: uninitialized symbol 'vmw_bo'.
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
564 static int vmw_user_bo_synccpu_release(struct drm_file *filp,
565 uint32_t handle,
566 uint32_t flags)
567 {
568 struct vmw_buffer_object *vmw_bo;
569 int ret = vmw_user_bo_lookup(filp, handle, &vmw_bo);
^^^^^
Can this fail?
570
571 if (!(flags & drm_vmw_synccpu_allow_cs)) {
572 atomic_dec(&vmw_bo->cpu_writers);
573 }
--> 574 ttm_bo_put(&vmw_bo->base);
^^^^^^^^^^^^^
Smatch thinks it can fail.
575
576 return ret;
577 }
regards,
dan carpenter
More information about the dri-devel
mailing list