Re: [patch 2/2] OMAP: MUSB: Check for NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Santhapuri, Damodar wrote:

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) {

  Can't really happen as 'request' is non-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)

  Your patch is corrupt -- missing newline.

WBR, Sergei

--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux