Skip to contentSkip to conversation

Staging: emxx_udc: Return NULL instead of 0.

PATCH Superseded Sandhya Bankar 2 participants 2 messages Feb 21, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: emxx_udc: Return NULL instead of 0.

Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL.

---
 drivers/staging/emxx_udc/emxx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/emxx_udc/emxx_udc.c +1 -1
index a1f624f..fe99fb1 100644
@@ -2626,7 +2626,7 @@ static struct usb_request *nbu2ss_ep_alloc_request(
 
 	req = kzalloc(sizeof(*req), gfp_flags);
 	if (!req)
-		return 0;
+		return NULL;
 
 #ifdef USE_DMA
 	req->req.dma = DMA_ADDR_INVALID;
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 12 lines · Sandhya Bankar

Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL.

---
 drivers/staging/emxx_udc/emxx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/emxx_udc/emxx_udc.c +0 -0
index a1f624f..fe99fb1 100644

drivers/staging/emxx_udc/emxx_udc.c static struct usb_request *nbu2ss_ep_alloc_request( · line 2629

Quoted 5 lines
drivers/staging/emxx_udc/emxx_udc.c +1 -1
@@ -2626,7 +2626,7 @@ static struct usb_request *nbu2ss_ep_alloc_request(
 
 	req = kzalloc(sizeof(*req), gfp_flags);
 	if (!req)
-		return 0;
+		return NULL;

Good catch. You could do this with Coccinelle :)

julia

Quoted 13 lines
drivers/staging/emxx_udc/emxx_udc.c +0 -1
 #ifdef USE_DMA
 	req->req.dma = DMA_ADDR_INVALID;
--

1.8.3.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160221025455.GA5576%40sandhya.
For more options, visit https://groups.google.com/d/optout.