Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756079AbbHDJMi (ORCPT ); Tue, 4 Aug 2015 05:12:38 -0400 Received: from mail-am1on0145.outbound.protection.outlook.com ([157.56.112.145]:8091 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754563AbbHDJMc convert rfc822-to-8bit (ORCPT ); Tue, 4 Aug 2015 05:12:32 -0400 From: "Karajgaonkar, Saurabh (S.)" To: "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" CC: "linux-arm-kernel@lists.infradead.org" , "kernel@stlinux.com" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH 9/9] usb: misc: ftdi-elan: Simplify return statement Thread-Topic: [PATCH 9/9] usb: misc: ftdi-elan: Simplify return statement Thread-Index: AQHQzpWvkC7QOFVj8UCr6k1uHQHKWQ== Date: Tue, 4 Aug 2015 09:12:28 +0000 Message-ID: <21701034f1472a3d154c77dd8d8be017565885f6.1438678566.git.skarajga@visteon.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=skarajga@visteon.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [74.112.167.117] x-microsoft-exchange-diagnostics: 1;DBXPR06MB384;5:NxN5DIW8uALqOBe8/Nlf6lw7isqEGVnsSXwIjvjgK4CPu7++q+idtIc6Qt7Zj4tFLOEq+2I9H+kiMBNwiEss/JqpHAC2RoffKrzFTm5BuY1YOMPT4ZMIJZlgY7jieD3G0yTb91/759h/PXScpVUQZg==;24:qtz5axU4YPeq8dBRFQuAXzozuYeglo+H5lyrTFZwAc8PBjE3WPEx0mj6OdphpjDFkRi4RJrxIv/m+z2pLN/pXjZHfXfOnKCPpGukDk63fxY=;20:1pjqEfmuGP1IwsI/3xtIPQBM9uhU0QH08f62rU/y1cGLnYzt7s/oRIReLuxzgD3EpxW5AgsKc4YvSMyed3R3lQ== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DBXPR06MB384; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DBXPR06MB384;BCL:0;PCL:0;RULEID:;SRVR:DBXPR06MB384; x-forefront-prvs: 0658BAF71F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(122556002)(2501003)(33646002)(40100003)(62966003)(77156002)(5001960100002)(36756003)(92566002)(229853001)(2950100001)(76176999)(81156007)(2900100001)(4001540100001)(106356001)(19580395003)(87936001)(2171001)(2656002)(66066001)(19580405001)(106116001)(102836002)(105586002)(54356999)(5001770100001)(5001830100001)(118296001)(5001860100001)(64706001)(101416001)(50986999)(5002640100001)(189998001)(2201001)(68736005)(86362001)(46102003)(77096005)(97736004)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DBXPR06MB384;H:DBXPR06MB382.eurprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <7EC9CF2E8817E94F8A8E3CE6F799276C@eurprd06.prod.outlook.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2015 09:12:28.9013 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR06MB384 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 46 From: Saurabh Karajgaonkar Replace redundant variable use in return statement. Signed-off-by: Saurabh Karajgaonkar --- 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); - if (UxxxStatus) - return UxxxStatus; - return 0; } static int ftdi_elan_found_controller(struct usb_ftdi *ftdi, int fn, int quirk) @@ -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); - if (UxxxStatus) - return UxxxStatus; - return 0; } else if (controllers > 0) { return -ENXIO; } else if (unrecognized > 0) { -- 1.9.1 -- 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/