Skip to content

Commit

Permalink
wmi: parse_wdg() should return kernel error codes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Matthew Garrett committed Sep 5, 2013
1 parent 5b5c2b3 commit 0a018a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 0a018a6

Please sign in to comment.