diff options
| author | Everest K.C. <[email protected]> | 2024-10-23 23:33:55 +0000 |
|---|---|---|
| committer | Thomas Hellström <[email protected]> | 2024-11-14 13:55:01 +0000 |
| commit | 6d9f9115c091c88cacf78734d8ea34c8609e8680 (patch) | |
| tree | 79fcf01f7e41d6bfeb36706985fa3119af494d15 /drivers/usb/cdns3/cdns3-ti.c | |
| parent | Merge tag 'drm-misc-next-2024-11-08' of https://gitlab.freedesktop.org/drm/mi... (diff) | |
| download | kernel-6d9f9115c091c88cacf78734d8ea34c8609e8680.tar.gz kernel-6d9f9115c091c88cacf78734d8ea34c8609e8680.zip | |
drm/xe/guc: Fix dereference before NULL check
The pointer list->list is dereferenced before the NULL check.
Fix this by moving the NULL check outside the for loop, so that
the check is performed before the dereferencing.
The list->list pointer cannot be NULL so this has no effect on runtime.
It's just a correctness issue.
This issue was reported by Coverity Scan.
https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600335
Fixes: 0f1fdf559225 ("drm/xe/guc: Save manual engine capture into capture list")
Signed-off-by: Everest K.C. <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: John Harrison <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 2aff81e039de5b0b7ef6bdcb2c320f121f69e2b4)
Signed-off-by: Thomas Hellström <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions
