From: Wei Yongjun Date: Sat, 10 Aug 2013 04:11:18 +0000 (+0900) Subject: sony-laptop: return a negative error code in sonypi_compat_init() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=03a174b35cb6064cd670428f8ea811fc2736a3a6;p=deliverable%2Flinux.git 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 Signed-off-by: Mattia Dongili Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 2ac045f27f10..b1627335ff00 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/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 */