USB: gadget: Enable BAM mode only for BAM2BAM transport
commit ea3e4e39 ("usb: gadget: Enable/Disable USB_BAM based on composition") enabling USB_BAM irrespective of the transport used in the driver. Only USB_GADGET_XPORT_BAM2BAM transport was used for BAM mode. With this change other transports which does not use BAM also enabling BAM and calling flush_work in function unbind causing null pointer dereference crash. Hence fix this by adding transport check for enabling USB_BAM using bam2bam_func_enabled flag. Change-Id: Ib2b19e5e9276f2e89d054edda536b590f751cba7 Signed-off-by:Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment