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

Kevin Tang kevin3.tang at gmail.com
Sat Dec 18 16:22:49 UTC 2021


Dear Dan,
Thank you for your notice. I have received it. I will be fix it later.

Best wishes

Dan Carpenter <dan.carpenter at oracle.com> 于2021年12月15日周三 19:32写道:
>
> 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


More information about the dri-devel mailing list