Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930AbbHQLQb (ORCPT ); Mon, 17 Aug 2015 07:16:31 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:36273 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754780AbbHQLQa (ORCPT ); Mon, 17 Aug 2015 07:16:30 -0400 Date: Mon, 17 Aug 2015 13:16:25 +0200 From: Johan Hovold To: "Karajgaonkar, Saurabh (S.)" Cc: "srinivas.kandagatla@gmail.com" , "maxime.coquelin@st.com" , "patrice.chotard@st.com" , "stern@rowland.harvard.edu" , "gregkh@linuxfoundation.org" , "mathias.nyman@intel.com" , "balbi@ti.com" , "johan@kernel.org" , "sergei.shtylyov@cogentembedded.com" , "Julia.Lawall@lip6.fr" , "khilman@linaro.org" , "rafael.j.wysocki@intel.com" , "pmladek@suse.cz" , "wsa@the-dreams.de" , "linux-arm-kernel@lists.infradead.org" , "kernel@stlinux.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement Message-ID: <20150817111625.GE7053@localhost> References: <05a5da593419a88886b1e75a0135d7b051b4bb76.1438695318.git.skarajga@visteon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05a5da593419a88886b1e75a0135d7b051b4bb76.1438695318.git.skarajga@visteon.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1385 Lines: 40 On Tue, Aug 04, 2015 at 02:04:35PM +0000, Karajgaonkar, Saurabh (S.) wrote: > From: Saurabh Karajgaonkar > > Replace redundant variable use in return statement. > > Signed-off-by: Saurabh Karajgaonkar > --- > 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/