Staging: emxx_udc: Return NULL instead of 0.
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
@@ -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
Quoted 12 lines · Sandhya Bankar
Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL.
Signed-off-by Sandhya Bankar <[email protected]>--- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/emxx_udc/emxx_udc.c +0
-0
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.