lkml.org 
[lkml]   [2017]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/8] platform/x86: fujitsu-laptop: move hotkey input device setup to a separate function
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ń <kernel@kempniu.pl>
> ---
> 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

\
 
 \ /
  Last update: 2017-03-29 22:14    [W:0.242 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site