drivers: watchdog: wdt_nrfx.c Fix channel id check in wdt_feed()
A Bug in the watchdog driver code allows an unconfigured
WDT timer channel to be feed.
The first configured WDT timer channel has an id of zero.
At this point, data->m_allocated_channels is equal to one.
The condition of the if statement is invalid and allows
channel one to be feed.
Change the test condition from greater to greater-or-equal.
Add check if channel id is less than zero.
Signed-off-by:
Sebastian Głąb <sebastian.glab@nordicsemi.no>
Loading
Please sign in to comment