All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: zackr@vmware.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/vmwgfx: Implement DRIVER_GEM
Date: Wed, 15 Dec 2021 14:20:57 +0300	[thread overview]
Message-ID: <20211215112057.GA13287@kili> (raw)

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

                 reply	other threads:[~2021-12-15 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215112057.GA13287@kili \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=zackr@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.