Skip to content

Commit

Permalink
sony-laptop: return a negative error code in sonypi_compat_init()
Browse files Browse the repository at this point in the history
Return -1 in the error handling case instead of 0, as done elsewhere in
this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Wei Yongjun authored and Matthew Garrett committed Aug 18, 2013
1 parent 50e37cc commit 03a174b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -4320,7 +4320,8 @@ static int sony_pic_add(struct acpi_device *device)
goto err_free_resources;
}

if (sonypi_compat_init())
result = sonypi_compat_init();
if (result)
goto err_remove_input;

/* request io port */
Expand Down

0 comments on commit 03a174b

Please sign in to comment.