lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x49oavw9dgv.fsf@segfault.boston.devel.redhat.com>
Date:	Thu, 07 Aug 2014 17:50:08 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Julia Lawall <Julia.Lawall@...6.fr>
Cc:	Felipe Balbi <balbi@...com>, kernel-janitors@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] usb: gadget: fix error return code

Julia Lawall <Julia.Lawall@...6.fr> writes:

> diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
> index d40255f..5c5d1ad 100644
> --- a/drivers/usb/gadget/udc/fusb300_udc.c
> +++ b/drivers/usb/gadget/udc/fusb300_udc.c
> @@ -1398,13 +1398,17 @@ static int fusb300_probe(struct platform_device *pdev)
>  
>  	/* initialize udc */
>  	fusb300 = kzalloc(sizeof(struct fusb300), GFP_KERNEL);
> -	if (fusb300 == NULL)
> +	if (fusb300 == NULL) {
> +		ret = -ENOMEM;
>  		goto clean_up;
> +	}
>  
>  	for (i = 0; i < FUSB300_MAX_NUM_EP; i++) {
>  		_ep[i] = kzalloc(sizeof(struct fusb300_ep), GFP_KERNEL);
> -		if (_ep[i] == NULL)
> +		if (_ep[i] == NULL) {
> +			ret = -ENOMEM;
>  			goto clean_up;
> +		}
>  		fusb300->ep[i] = _ep[i];
>  	}

Reviewed-by: Jeff Moyer <jmoyer@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ