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 <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2023-01-02 14:29:53 +01:00 committed by Carles Cufí
commit e5aa0ab796

View file

@ -428,7 +428,7 @@ static bool channel_processing_check_and_clear(int32_t chan)
/* The processing of channel can be caused by CC match
* or be forced.
*/
result = atomic_and(&force_isr_mask, ~BIT(chan)) ||
result = (atomic_and(&force_isr_mask, ~BIT(chan)) & BIT(chan)) ||
event_check(chan);
if (result) {