Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208532 > unrolled thread

Re: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement

Started byJohan Hovold <johan@kernel.org>
First post2015-08-17 13:20 +0200
Last post2015-08-17 13:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement Johan Hovold <johan@kernel.org> - 2015-08-17 13:20 +0200

#1208532 — Re: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement

FromJohan Hovold <johan@kernel.org>
Date2015-08-17 13:20 +0200
SubjectRe: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement
Message-ID<pYqCl-5HD-3@gated-at.bofh.it>
On Tue, Aug 04, 2015 at 02:04:35PM +0000, Karajgaonkar, Saurabh (S.) wrote:
> From: Saurabh Karajgaonkar <skarajga@visteon.com>
> 
> Replace redundant variable use in return statement.
> 
> Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com>
> ---
>  drivers/usb/serial/mxuport.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
> index 460a406..31a8b47 100644
> --- a/drivers/usb/serial/mxuport.c
> +++ b/drivers/usb/serial/mxuport.c
> @@ -1137,13 +1137,9 @@ static int mxuport_port_probe(struct usb_serial_port *port)
>  		return err;
>  
>  	/* Set interface (RS-232) */
> -	err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> -				    MX_INT_RS232,
> -				    port->port_number);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> +				     MX_INT_RS232,
> +				     port->port_number);

I do not consider this an improvement as it makes the final ctrl-request
call look different from the previous two without any real benefit.

I'll drop this one.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web