diff --git a/drivers/platform/msm/usb_bam.c b/drivers/platform/msm/usb_bam.c index a304574418d4..05a8cf596e17 100644 --- a/drivers/platform/msm/usb_bam.c +++ b/drivers/platform/msm/usb_bam.c @@ -866,6 +866,7 @@ static int connect_pipe(enum usb_ctrl cur_bam, u8 idx, u32 *usb_pipe_idx, sps_disconnect(*pipe); free_sps_endpoint: sps_free_endpoint(*pipe); + *pipe = NULL; return ret; }