Skip to content

Commit

Permalink
fix(dcd_dwc2): error assest for endpoint close
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunru-hub committed Apr 30, 2024
1 parent bc22a51 commit f31080d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,10 @@ static bool dcd_edpt_counter_available(uint8_t rhport, uint8_t dir)
static bool dcd_edpt_counter_release(uint8_t rhport, uint8_t dir)
{
if (dir) {
TU_ASSERT(dwc2_ep_counters[rhport].active_in == 0); // Check if number of opened EPs is not zero
TU_ASSERT(dwc2_ep_counters[rhport].active_in != 0); // Check if number of opened EPs is not zero
dwc2_ep_counters[rhport].active_in--; // Decrease endpoint counter
} else {
TU_ASSERT(dwc2_ep_counters[rhport].active_out == 0);
TU_ASSERT(dwc2_ep_counters[rhport].active_out != 0);
dwc2_ep_counters[rhport].active_out--;
}
return true;
Expand Down

0 comments on commit f31080d

Please sign in to comment.