usb: gadget: Fix port deallocation mark
Upon allocation of a u_bam_data port, we first check if this port
was allocated previously or not. If it was allocated previously
we bail out. However, due to a bug in the port free function,
the local variable was marked as null instead of the global one.
Therefore the port was freed however the global variable still
pointed to the freed memory location.
This caused a spinlock bad magic error, since the code later tried to
lock a spinlock from a freed location.
Change-Id: Ib43a39ebb3228fddc5b36ebc62a2dfb48b4db605
CRs-Fixed: 646606
Signed-off-by:
Ido Shayevitz <idos@codeaurora.org>
Loading
Please register or sign in to comment