iris: remove redundant check

list_del dereferences both next and prev, so if only one of them could
be NULL we would get crashes already.

Should fix "Dereference after null check" reported by Coverity.

Code was added in: 64b73b770b ("iris: Fix bad external BO hash table and zombie list interactions")

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
This commit is contained in:
Marcin Ślusarz 2020-12-15 15:43:21 +01:00 committed by Marge Bot
parent bec3463977
commit 8f438f646c

View file

@ -206,7 +206,7 @@ find_and_ref_external_bo(struct hash_table *ht, unsigned int key)
* we hadn't yet closed it...and then reimported the same BO. If it
* is, then remove it since it's now been resurrected.
*/
if (bo->head.prev || bo->head.next)
if (bo->head.next)
list_del(&bo->head);
iris_bo_reference(bo);