Skip to content

Commit e5aa0ab

Browse files
ananglcarlescufi
authored andcommitted
drivers: nrf_rtc_timer: Check channel bit when handling force_isr_mask
Add missing masking against `BIT(chan)` when handling a forced ISR to avoid unnecessary processing of multiple channels instead of just the one that actually requires it. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent ac96b86 commit e5aa0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/timer/nrf_rtc_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static bool channel_processing_check_and_clear(int32_t chan)
428428
/* The processing of channel can be caused by CC match
429429
* or be forced.
430430
*/
431-
result = atomic_and(&force_isr_mask, ~BIT(chan)) ||
431+
result = (atomic_and(&force_isr_mask, ~BIT(chan)) & BIT(chan)) ||
432432
event_check(chan);
433433

434434
if (result) {

0 commit comments

Comments
 (0)