[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0afd44f-177d-ad21-02b5-93b15b29399e@cogentembedded.com>
Date: Tue, 24 Mar 2020 17:50:07 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Tang Bin <tangbin@...s.chinamobile.com>, cernekee@...il.com,
balbi@...nel.org, gregkh@...uxfoundation.org
Cc: f.fainelli@...il.com, bcm-kernel-feedback-list@...adcom.com,
linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2]usb: gadget: bcm63xx_udc:remove redundant variable
assignment
Hello!
On 03/24/2020 04:20 PM, Tang Bin wrote:
> --v1------------------------------------
> In this function, the variable 'rc' is assigned after this place,
> so the definition is invalid.
>
> --v2------------------------------------
> In this function, the variable 'rc' will be assigned by the function
> 'usb_add_gadget_udc()',so the assignment here is redundant,we should
> remove it.
>
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
NAK.
> ---
> drivers/usb/gadget/udc/bcm63xx_udc.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
> index 54501814d..a7afa8c35 100644
> --- a/drivers/usb/gadget/udc/bcm63xx_udc.c
> +++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
> @@ -2321,8 +2321,6 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
> if (rc)
> return rc;
>
> - rc = -ENXIO;
> -
> /* IRQ resource #0: control interrupt (VBUS, speed, etc.) */
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
This *if* branch goes to the 'out_uninit' label which uses 'rc' (and it should
be negative).
In principle, if you change 'rc' to 'irq' below, this patch would be sane.
It's not as is.
MBR, Sergei
Powered by blists - more mailing lists