diff mbox series

usb: gadget: bcm63xx_udc:remove useless variable definition

Message ID 20200324062932.8364-1-tangbin@cmss.chinamobile.com (mailing list archive)
State New, archived
Headers show
Series usb: gadget: bcm63xx_udc:remove useless variable definition | expand

Commit Message

Tang Bin March 24, 2020, 6:29 a.m. UTC
In this function, the variable 'rc' is assigned after this place,
so the definition is invalid.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/usb/gadget/udc/bcm63xx_udc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sergei Shtylyov March 24, 2020, 8:35 a.m. UTC | #1
Hello!

On 24.03.2020 9:29, Tang Bin wrote:

> In this function, the variable 'rc' is assigned after this place,
> so the definition is invalid.

    What definition? Did you mean assignment?

> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>   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)

MBR, Sergei
Greg Kroah-Hartman March 24, 2020, 11:06 a.m. UTC | #2
On Tue, Mar 24, 2020 at 05:19:22PM +0800, 唐彬 wrote:
> Dear Sir:
>         I'm glad for you replay。Yes。I think the variable assignment here can be deleted。

Great, can you please fix up your patch to say that?

thanks,

greg k-h
diff mbox series

Patch

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)