Skip to content

Commit 290fdc4

Browse files
Zhen LeiKAGA-KOKO
authored andcommitted
genirq/timings: Fix error return code in irq_timings_test_irqs()
Return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f52da98 ("genirq/timings: Add selftest for irqs circular buffer") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9284873 commit 290fdc4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/irq/timings.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,12 +794,14 @@ static int __init irq_timings_test_irqs(struct timings_intervals *ti)
794794

795795
__irq_timings_store(irq, irqs, ti->intervals[i]);
796796
if (irqs->circ_timings[i & IRQ_TIMINGS_MASK] != index) {
797+
ret = -EBADSLT;
797798
pr_err("Failed to store in the circular buffer\n");
798799
goto out;
799800
}
800801
}
801802

802803
if (irqs->count != ti->count) {
804+
ret = -ERANGE;
803805
pr_err("Count differs\n");
804806
goto out;
805807
}

0 commit comments

Comments
 (0)