]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
wmi: parse_wdg() should return kernel error codes
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Aug 2013 09:02:30 +0000 (12:02 +0300)
committerMatthew Garrett <matthew.garrett@nebula.com>
Thu, 5 Sep 2013 12:52:06 +0000 (08:52 -0400)
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>
drivers/platform/x86/wmi.c

index 6e02c953d888dd13113ee9f1cd19e40ef01d82ce..601ea951224201a87719f0acc7de5ee7e4635649 100644 (file)
@@ -780,7 +780,7 @@ static bool guid_already_parsed(const char *guid_string)
 /*
  * Parse the _WDG method for the GUID data blocks
  */
-static acpi_status parse_wdg(acpi_handle handle)
+static int parse_wdg(acpi_handle handle)
 {
        struct acpi_buffer out = {ACPI_ALLOCATE_BUFFER, NULL};
        union acpi_object *obj;
@@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
 
                wblock = kzalloc(sizeof(struct wmi_block), GFP_KERNEL);
                if (!wblock)
-                       return AE_NO_MEMORY;
+                       return -ENOMEM;
 
                wblock->handle = handle;
                wblock->gblock = gblock[i];