drivers/counter/counter_native_sim: Merge if statements

To reduce the perceived code complexity

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2025-05-12 17:30:42 +02:00 committed by Benjamin Cabé
commit 5c959c6136

View file

@ -73,10 +73,8 @@ static void counter_isr(const void *arg)
} }
} }
if (is_top_set && (current_value == top.ticks)) { if (is_top_set && (current_value == top.ticks) && top.callback) {
if (top.callback) { top.callback(dev_p, top.user_data);
top.callback(dev_p, top.user_data);
}
} }
schedule_next_isr(); schedule_next_isr();