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] [day] [month] [year] [list]
Message-ID: <4CA9C571.3070909@arcor.de>
Date:	Mon, 04 Oct 2010 14:15:45 +0200
From:	Thomas Dahlmann <dahlmann.thomas@...or.de>
To:	Rahul Ruikar <rahul.ruikar@...il.com>
CC:	David Brownell <dbrownell@...rs.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-geode@...ts.infradead.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: gadget: amd5536udc: Fix error path

ACK

Thanks for the fix!

Thomas


On 10/2/2010 9:10 AM, Rahul Ruikar wrote:
> In function udc_probe()
> call put_device() when device_register() fails.
>
> Signed-off-by: Rahul Ruikar<rahul.ruikar@...il.com>
> ---
>   drivers/usb/gadget/amd5536udc.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
> index 731150d4..950ee33 100644
> --- a/drivers/usb/gadget/amd5536udc.c
> +++ b/drivers/usb/gadget/amd5536udc.c
> @@ -3382,8 +3382,10 @@ static int udc_probe(struct udc *dev)
>   	udc = dev;
>
>   	retval = device_register(&dev->gadget.dev);
> -	if (retval)
> +	if (retval) {
> +		put_device(&dev->gadget.dev);
>   		goto finished;
> +	}
>
>   	/* timer init */
>   	init_timer(&udc_timer);
>    

--
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