Browse Source

sony-laptop: return a negative error code in sonypi_compat_init()

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>
Wei Yongjun 12 years ago
parent
commit
03a174b35c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/platform/x86/sony-laptop.c

+ 2 - 1
drivers/platform/x86/sony-laptop.c

@@ -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 */