[bug report] accel/ivpu: Add GEM buffer object management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jacek Lawrynowicz,

This is a semi-automatic email about new static checker warnings.

Commit 647371a6609d ("accel/ivpu: Add GEM buffer object management")
from Jan 17, 2023, leads to the following Smatch complaint:

    ./drivers/accel/ivpu/ivpu_drv.c:119 ivpu_file_priv_put()
    warn: variable dereferenced before check 'file_priv' (see line 117)

./drivers/accel/ivpu/ivpu_drv.c
   116		struct ivpu_file_priv *file_priv = *link;
   117		struct ivpu_device *vdev = file_priv->vdev;
                                           ^^^^^^^^^^^^^^^
Dereference

   118	
   119		drm_WARN_ON(&vdev->drm, !file_priv);
                                         ^^^^^^^^^
Pointless check.  If there is a NULL dereference it already prints a stack
trace.  Also it's really unlikely that we're going to predict which pointer is
going to lead to a NULL dereference ahead of time.

   120	
   121		ivpu_dbg(vdev, KREF, "file_priv put: ctx %u refcount %u\n",

regards,
dan carpenter



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux