* [bug report] drm/sprd: add Unisoc's drm kms master
@ 2021-12-15 11:32 Dan Carpenter
2021-12-18 16:22 ` Kevin Tang
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-12-15 11:32 UTC (permalink / raw)
To: kevin3.tang; +Cc: dri-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] drm/sprd: add Unisoc's drm kms master
2021-12-15 11:32 [bug report] drm/sprd: add Unisoc's drm kms master Dan Carpenter
@ 2021-12-18 16:22 ` Kevin Tang
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Tang @ 2021-12-18 16:22 UTC (permalink / raw)
To: Dan Carpenter; +Cc: dri-devel
Dear Dan,
Thank you for your notice. I have received it. I will be fix it later.
Best wishes
Dan Carpenter <dan.carpenter@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-18 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 11:32 [bug report] drm/sprd: add Unisoc's drm kms master Dan Carpenter
2021-12-18 16:22 ` Kevin Tang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).