[bug report] drm/sprd: add Unisoc's drm kms master

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

 



Hello Kevin Tang,

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

The patch 43531edd53f0: "drm/sprd: add Unisoc's drm kms master" from
Dec 7, 2021, leads to the following Smatch complaint:

    drivers/gpu/drm/sprd/sprd_drm.c:158 sprd_drm_shutdown()
    error: we previously assumed 'drm' could be null (see line 157)

drivers/gpu/drm/sprd/sprd_drm.c
   153        static void sprd_drm_shutdown(struct platform_device *pdev)
   154        {
   155                struct drm_device *drm = platform_get_drvdata(pdev);
   156
   157                if (!drm) {
                          ^^^^
"drm" is NULL

   158                        drm_warn(drm, "drm device is not available, no shutdown\n");
                                       ^^^
This dereferences it.  drm is set in bind().

   159                        return;
   160                }
   161
   162                drm_atomic_helper_shutdown(drm);
   163        }

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