[U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment

Marek Vasut marex at denx.de
Sun Mar 18 12:27:39 UTC 2018


On 03/18/2018 01:25 PM, Heinrich Schuchardt wrote:
> Assigning a value to ret if it is immediately overwritten does not make
> sense.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

Did you even compile-test this ? I have a feeling this file is not used
at all, so maybe we should remove this driver.

> ---
>  drivers/usb/host/ehci-faraday.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c
> index 821222cc5d..80a06bb2c0 100644
> --- a/drivers/usb/host/ehci-faraday.c
> +++ b/drivers/usb/host/ehci-faraday.c
> @@ -36,7 +36,7 @@ void faraday_ehci_set_usbmode(struct ehci_ctrl *ctrl)
>  
>  int faraday_ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg)
>  {
> -	int spd, ret = PORTSC_PSPD_HS;
> +	int spd, ret;
>  	union ehci_faraday_regs *regs;
>  
>  	ret = (void __iomem *)((ulong)ctrl->hcor - 0x10);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list