Skip to content

Commit 65d7312

Browse files
Zhen LeiKelsey Skunberg
authored andcommitted
genirq/timings: Fix error return code in irq_timings_test_irqs()
BugLink: https://bugs.launchpad.net/bugs/1946024 [ Upstream commit 290fdc4 ] 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] Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Kelsey Skunberg <[email protected]>
1 parent 036fbc9 commit 65d7312

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
@@ -799,12 +799,14 @@ static int __init irq_timings_test_irqs(struct timings_intervals *ti)
799799

800800
__irq_timings_store(irq, irqs, ti->intervals[i]);
801801
if (irqs->circ_timings[i & IRQ_TIMINGS_MASK] != index) {
802+
ret = -EBADSLT;
802803
pr_err("Failed to store in the circular buffer\n");
803804
goto out;
804805
}
805806
}
806807

807808
if (irqs->count != ti->count) {
809+
ret = -ERANGE;
808810
pr_err("Count differs\n");
809811
goto out;
810812
}

0 commit comments

Comments
 (0)