Skip to contentSkip to conversation

mailbox: remove an unneeded NULL check on list iterator

PATCH RESEND Superseded Xiaomeng Tong 1 participant 1 message Apr 5, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mailbox: remove an unneeded NULL check on list iterator

The list iterator is always non-NULL so it doesn't need to be checked. Thus just remove the unnecessary NULL check.

---
 drivers/mailbox/tegra-hsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/tegra-hsp.c +1 -1
index acd0675da681..64eaee089b03 100644
@@ -799,7 +799,7 @@ static int __maybe_unused tegra_hsp_resume(struct device *dev)
 	struct tegra_hsp_doorbell *db;
 
 	list_for_each_entry(db, &hsp->doorbells, list) {
-		if (db && db->channel.chan)
+		if (db->channel.chan)
 			tegra_hsp_doorbell_startup(db->channel.chan);
 	}
 
Signature · 1 line
2.17.1