AMA5 OHCI: Pointers to allocated port values were not being nullified after being deallocated. This caused some assertions when debug was enabled
This commit is contained in:
parent
1211bbd904
commit
77439f3c75
@ -1394,7 +1394,7 @@ static int sam_ep0enqueue(struct sam_rhport_s *rhport)
|
||||
tdtail = sam_tdalloc();
|
||||
if (!tdtail)
|
||||
{
|
||||
sam_edfree(rhport->ep0.ed);
|
||||
sam_edfree(edctrl);
|
||||
irqrestore(flags);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -1466,7 +1466,7 @@ static int sam_ep0enqueue(struct sam_rhport_s *rhport)
|
||||
* Name: sam_ep0dequeue
|
||||
*
|
||||
* Description:
|
||||
* Remove the ED for EP0 from the control ED list and posssibly disable control
|
||||
* Remove the ED for EP0 from the control ED list and possibly disable control
|
||||
* list processing.
|
||||
*
|
||||
* Input Parameters:
|
||||
@ -1548,6 +1548,7 @@ static void sam_ep0dequeue(struct sam_rhport_s *rhport)
|
||||
sam_putreg(regval, SAM_USBHOST_CTRL);
|
||||
}
|
||||
}
|
||||
|
||||
irqrestore(flags);
|
||||
|
||||
/* Release any TDs that may still be attached to the ED. */
|
||||
@ -1567,6 +1568,9 @@ static void sam_ep0dequeue(struct sam_rhport_s *rhport)
|
||||
|
||||
sam_tdfree(tdtail);
|
||||
sam_edfree(edctrl);
|
||||
|
||||
rhport->ep0.ed = NULL;
|
||||
rhport->ep0.tail = NULL;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user