Re: [PATCH] usb: gadget: f_fs: fix sparse warning

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

 



On Thu, Dec 12 2013, Felipe Balbi wrote:
> use NULL when returning NULL pointers, not 0.
>
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

> ---
>  drivers/usb/gadget/f_fs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
> index 12a64e1..306a2b5 100644
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -1137,7 +1137,7 @@ static struct ffs_data *ffs_data_new(void)
>  {
>  	struct ffs_data *ffs = kzalloc(sizeof *ffs, GFP_KERNEL);
>  	if (unlikely(!ffs))
> -		return 0;
> +		return NULL;
>  
>  	ENTER();
>  
> -- 
> 1.8.4.GIT
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux