summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 12:02:30 +0300
committerMatthew Garrett <matthew.garrett@nebula.com>2013-09-05 08:52:06 -0400
commit0a018a68d3bfbd6288f3b646edb0dd0720209790 (patch)
tree083659b980d4db0e5071cb86f54f0c7a15b2e43e
parent5b5c2b3c9b0585350d2da62bc4b990d9bf836d94 (diff)
downloadop-kernel-dev-0a018a68d3bfbd6288f3b646edb0dd0720209790.zip
op-kernel-dev-0a018a68d3bfbd6288f3b646edb0dd0720209790.tar.gz
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>
-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 6e02c95..601ea95 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)
/*
* 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];
OpenPOWER on IntegriCloud