All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: emxx_udc: Return NULL instead of 0.
@ 2016-02-21  2:54 Sandhya Bankar
  2016-02-21 12:27 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-02-21  2:54 UTC (permalink / raw)
  To: outreachy-kernel

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

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index a1f624f..fe99fb1 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -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;
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH] Staging: emxx_udc: Return NULL instead of 0.
  2016-02-21  2:54 [PATCH] Staging: emxx_udc: Return NULL instead of 0 Sandhya Bankar
@ 2016-02-21 12:27 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-02-21 12:27 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel

On Sun, 21 Feb 2016, Sandhya Bankar wrote:

> Return NULL instead of 0 from nbu2ss_ep_alloc_request(),if req pointer is NULL.
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
>  drivers/staging/emxx_udc/emxx_udc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index a1f624f..fe99fb1 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -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

>
>  #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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-21 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-21  2:54 [PATCH] Staging: emxx_udc: Return NULL instead of 0 Sandhya Bankar
2016-02-21 12:27 ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.