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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR02MB66351AD97EC3191A7DF6E456AA919@DM6PR02MB6635.namprd02.prod.outlook.com>
Date:   Mon, 8 Nov 2021 04:49:45 +0000
From:   Shubhrajyoti Datta <shubhraj@...inx.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        "balbi@...nel.org" <balbi@...nel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Michal Simek <michals@...inx.com>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "jiapeng.chong@...ux.alibaba.com" <jiapeng.chong@...ux.alibaba.com>,
        "abaci-bugfix@...ux.alibaba.com" <abaci-bugfix@...ux.alibaba.com>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH] usb: gadget: udc-xilinx: Fix an error handling path in
 'xudc_probe()'



> -----Original Message-----
> From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Sent: Sunday, November 7, 2021 9:56 PM
> To: balbi@...nel.org; gregkh@...uxfoundation.org; Michal Simek
> <michals@...inx.com>; lee.jones@...aro.org; jiapeng.chong@...ux.alibaba.com;
> abaci-bugfix@...ux.alibaba.com; Shubhrajyoti Datta <shubhraj@...inx.com>
> Cc: linux-usb@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-
> kernel@...r.kernel.org; kernel-janitors@...r.kernel.org; Christophe JAILLET
> <christophe.jaillet@...adoo.fr>
> Subject: [PATCH] usb: gadget: udc-xilinx: Fix an error handling path in
> 'xudc_probe()'
> 
> A successful 'clk_prepare_enable()' call should be balanced by a corresponding
> 'clk_disable_unprepare()' call in the error handling path of the probe, as already
> done in the remove function.
> 
Reviewed-by: Shubhrajyoti Datta <shubhraj@...inx.com>

> Fixes: 24749229211c ("usb: gadget: udc-xilinx: Add clock support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/usb/gadget/udc/udc-xilinx.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-
> xilinx.c
> index f5ca670776a3..857159dd5ae0 100644
> --- a/drivers/usb/gadget/udc/udc-xilinx.c
> +++ b/drivers/usb/gadget/udc/udc-xilinx.c
> @@ -2136,7 +2136,7 @@ static int xudc_probe(struct platform_device *pdev)
> 
>  	ret = usb_add_gadget_udc(&pdev->dev, &udc->gadget);
>  	if (ret)
> -		goto fail;
> +		goto err_disable_unprepare_clk;
> 
>  	udc->dev = &udc->gadget.dev;
> 
> @@ -2155,6 +2155,9 @@ static int xudc_probe(struct platform_device *pdev)
>  		 udc->dma_enabled ? "with DMA" : "without DMA");
> 
>  	return 0;
> +
> +err_disable_unprepare_clk:
> +	clk_disable_unprepare(udc->clk);
>  fail:
>  	dev_err(&pdev->dev, "probe failed, %d\n", ret);
>  	return ret;
> --
> 2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ