dwc_otg: memory allocation/error handling bugfixes

Bugs found during the hunt for #217 - triggering OOPSes in error cases.