drm/amd/ras: delete an unnecessary NULL check
Subsystems (3)
PATCH 1/1 drm/amd/ras: delete an unnecessary NULL check
The list iterator in a list_for_each_entry() loop can never be NULL. Delete the unnecessary NULL check.
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/gpu/drm/amd/ras/rascore/ras_umc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/rascore/ras_umc.c +1 -1
@@ -207,7 +207,7 @@ int ras_umc_log_pending_bad_bank(struct ras_core_context *ras_core)mutex_lock (&ras_umc->pending_ecc_lock);list_for_each_entry_safe (ecc_node, tmp, &ras_umc->pending_ecc_list, node){ -if (ecc_node && !ras_umc_log_bad_bank (ras_core, &ecc_node->ecc)) { +if (!ras_umc_log_bad_bank (ras_core, &ecc_node->ecc)) {list_del (&ecc_node->node);kfree (ecc_node); }
Signature · 1 line
2.51.0