usb: gadget: u_bam: Fix NULL pointer dereference crash

port->port_usb could be NULL as part of assigning to in endpoint, so,
check port->port_usb is valid before assigning the endpoint.

CRs-Fixed: 451723
Change-Id: I00acc5e7a3ca2f47046908c345e4a0ed050fe122
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
1 file changed