From: Satish Kumar <x0124230@xxxxxx> Checking for null pointer assignments in MUSB driver Signed-off-by: Satish Kumar <x0124230@xxxxxx> Signed-off-by: Damodar Santhapuri <x0132156@xxxxxx> --- drivers/usb/musb/musb_gadget.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 9b3c937..002ddbe 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -110,6 +110,10 @@ __acquires(ep->musb->lock) int busy = ep->busy; req = to_musb_request(request); + if (req == NULL) { + DBG(3, "req might be NULL pointer"); + return; + } list_del(&request->list); if (req->request.status == -EINPROGRESS) @@ -752,6 +756,10 @@ void musb_g_rx(struct musb *musb, u8 epnum) musb_ep_select(mbase, epnum); request = next_request(musb_ep); + if (request == NULL) { + DBG(3, "request might be NULL pointer"); + return; + } csr = musb_readw(epio, MUSB_RXCSR); dma = is_dma_capable() ? musb_ep->dma : NULL; -- 1.5.4.3-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html