lib: sbi: sse: remove superfluous sbi_list_empty() check
authorClément Léger <cleger@rivosinc.com>
Tue, 9 Apr 2024 10:02:05 +0000 (12:02 +0200)
committerAnup Patel <anup@brainfault.org>
Tue, 7 May 2024 11:57:31 +0000 (17:27 +0530)
The list loop below that check is actually not looping if the list is
empty so there was no need for this check.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reported-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_sse.c

index 1b6048d852630bdc1af85114636c2cafc399f2af..2c7f78d255a18abb824fb06330ff47d44b5b58db 100644 (file)
@@ -578,9 +578,6 @@ void sbi_sse_process_pending_events(struct sbi_trap_regs *regs)
 
        spin_lock(&state->enabled_event_lock);
 
-       if (sbi_list_empty(&state->enabled_event_list))
-               goto out;
-
        sbi_list_for_each_entry(e, &state->enabled_event_list, node) {
                ret = sse_event_check_inject(e, regs);
                if (ret)