aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/wmi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 05:02:30 -0400
committerMatthew Garrett <matthew.garrett@nebula.com>2013-09-05 08:52:06 -0400
commit0a018a68d3bfbd6288f3b646edb0dd0720209790 (patch)
tree083659b980d4db0e5071cb86f54f0c7a15b2e43e /drivers/platform/x86/wmi.c
parent5b5c2b3c9b0585350d2da62bc4b990d9bf836d94 (diff)
wmi: parse_wdg() should return kernel error codes
The current code returns a mix of acpi_status and kernel error codes. It should just return kernel error codes. There are already error paths in this function which return -ENOMEM and that's what the caller expects. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r--drivers/platform/x86/wmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 6e02c953d888..601ea9512242 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -780,7 +780,7 @@ static bool guid_already_parsed(const char *guid_string)
780/* 780/*
781 * Parse the _WDG method for the GUID data blocks 781 * Parse the _WDG method for the GUID data blocks
782 */ 782 */
783static acpi_status parse_wdg(acpi_handle handle) 783static int parse_wdg(acpi_handle handle)
784{ 784{
785 struct acpi_buffer out = {ACPI_ALLOCATE_BUFFER, NULL}; 785 struct acpi_buffer out = {ACPI_ALLOCATE_BUFFER, NULL};
786 union acpi_object *obj; 786 union acpi_object *obj;
@@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
812 812
813 wblock = kzalloc(sizeof(struct wmi_block), GFP_KERNEL); 813 wblock = kzalloc(sizeof(struct wmi_block), GFP_KERNEL);
814 if (!wblock) 814 if (!wblock)
815 return AE_NO_MEMORY; 815 return -ENOMEM;
816 816
817 wblock->handle = handle; 817 wblock->handle = handle;
818 wblock->gblock = gblock[i]; 818 wblock->gblock = gblock[i];