Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932851AbdC2UNT (ORCPT ); Wed, 29 Mar 2017 16:13:19 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:49224 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932781AbdC2UMn (ORCPT ); Wed, 29 Mar 2017 16:12:43 -0400 Date: Wed, 29 Mar 2017 13:12:39 -0700 From: Darren Hart To: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= Cc: Jonathan Woithe , Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/8] platform/x86: fujitsu-laptop: move hotkey input device setup to a separate function Message-ID: <20170329201239.GE15472@localhost.localdomain> References: <20170320093224.18541-1-kernel@kempniu.pl> <20170320093224.18541-5-kernel@kempniu.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170320093224.18541-5-kernel@kempniu.pl> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 30 On Mon, Mar 20, 2017 at 10:32:20AM +0100, Michał Kępień wrote: > Simplify error handling in acpi_fujitsu_laptop_add() by moving code > responsible for setting up the input device to a separate function. > > Signed-off-by: Michał Kępień > --- > drivers/platform/x86/fujitsu-laptop.c | 74 ++++++++++++++++++++--------------- > 1 file changed, 43 insertions(+), 31 deletions(-) > > diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c > index 3483ac37bee5..b1a08d83330b 100644 > --- a/drivers/platform/x86/fujitsu-laptop.c > +++ b/drivers/platform/x86/fujitsu-laptop.c > @@ -794,7 +834,6 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device) > { > int result = 0; > int state = 0; > - struct input_dev *input; > int error; This patch highlights the odd error handling / return path with the odd mix of result and error. Not introduced here, but something for a future cleanup perhaps. -- Darren Hart VMware Open Source Technology Center