Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105678
b: refs/heads/master
c: f88133d
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Andi Kleen committed Jul 21, 2008
1 parent 8c97877 commit 46cb01f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8294fafdafc602ed11f401c44628fab8558c5cf5
refs/heads/master: f88133d76ea38761b7379d6233b752ed82250a4a
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/namespace/nsnames.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
/* Calculate required buffer size based on depth below root */

size = acpi_ns_get_pathname_length(node);
if (!size) {
ACPI_ERROR((AE_INFO, "Invalid node failure"));
return_PTR(NULL);
}

/* Allocate a buffer to be returned to caller */

Expand Down Expand Up @@ -229,6 +233,10 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle,
/* Determine size required for the caller buffer */

required_size = acpi_ns_get_pathname_length(node);
if (!required_size) {
ACPI_ERROR((AE_INFO, "Invalid node failure"));
return_ACPI_STATUS(AE_ERROR);
}

/* Validate/Allocate/Clear caller buffer */

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/acpi/utilities/utalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
{
acpi_status status = AE_OK;

if (!required_length) {
WARN_ON(1);
return AE_ERROR;
}
switch (buffer->length) {
case ACPI_NO_BUFFER:

Expand Down

0 comments on commit 46cb01f

Please sign in to comment.