[PATCH 9/9] usb: misc: ftdi-elan: Simplify return statement

Sergei Shtylyov sergei.shtylyov at cogentembedded.com
Tue Aug 4 03:03:17 PDT 2015


Hello.

On 8/4/2015 12:12 PM, Karajgaonkar, Saurabh (S.) wrote:

> From: Saurabh Karajgaonkar <skarajga at visteon.com>

> Replace redundant variable use in return statement.

> Signed-off-by: Saurabh Karajgaonkar <skarajga at visteon.com>
> ---
>   drivers/usb/misc/ftdi-elan.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)

> diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
> index 8ab1f8f..1545f12 100644
> --- a/drivers/usb/misc/ftdi-elan.c
> +++ b/drivers/usb/misc/ftdi-elan.c
> @@ -2568,11 +2568,8 @@ static int ftdi_elan_close_controller(struct usb_ftdi *ftdi, int fn)
>   					    0x00);
>   	if (UxxxStatus)
>   		return UxxxStatus;
> -	UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
> +	return ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
>   					   &pcidata);

    Please keep the continuation line aligned by starting it under 'ftdi'.

[...]
> @@ -2695,11 +2692,8 @@ static int ftdi_elan_setupOHCI(struct usb_ftdi *ftdi)
>   		}
>   	}
>   	if (ftdi->function > 0) {
> -		UxxxStatus = ftdi_elan_setup_controller(ftdi,
> +		return ftdi_elan_setup_controller(ftdi,
>   							ftdi->function - 1);

    Likewise.

[...]

MBR, Sergei




More information about the linux-arm-kernel mailing list