]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mailbox: remove an unneeded NULL check on list iterator
authorXiaomeng Tong <xiam0nd.tong@gmail.com>
Tue, 5 Apr 2022 08:05:56 +0000 (16:05 +0800)
committerJassi Brar <jaswinder.singh@linaro.org>
Sat, 21 May 2022 16:41:29 +0000 (11:41 -0500)
The list iterator is always non-NULL so it doesn't need to be checked.
Thus just remove the unnecessary NULL check.

Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/tegra-hsp.c

index 78f7265039c66778ddfb34066454d79227d5eed7..a55d6df99697898f6d941bb95fcf89b82f77cb77 100644 (file)
@@ -804,7 +804,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);
        }