diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-26 10:25:59 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-26 10:25:59 +0200 |
commit | 3cf430b0636045dc524759a0852293ba037732a7 (patch) | |
tree | 2c4e03f9028dc23ab4e6ca5a3a5a263af397984f /drivers/acpi/utilities/utobject.c | |
parent | 93dcf55f828b035fc93fc19eb03c1390e1e6d570 (diff) | |
parent | 83097aca8567a0bd593534853b71fe0fa9a75d69 (diff) | |
download | kernel-crypto-3cf430b0636045dc524759a0852293ba037732a7.tar.gz kernel-crypto-3cf430b0636045dc524759a0852293ba037732a7.tar.xz kernel-crypto-3cf430b0636045dc524759a0852293ba037732a7.zip |
Merge branch 'linus' into sched/devel
Diffstat (limited to 'drivers/acpi/utilities/utobject.c')
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index e25484495e6..916eff399eb 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c @@ -425,6 +425,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, acpi_size * obj_length) { acpi_size length; + acpi_size size; acpi_status status = AE_OK; ACPI_FUNCTION_TRACE_PTR(ut_get_simple_object_size, internal_object); @@ -484,10 +485,14 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, * Get the actual length of the full pathname to this object. * The reference will be converted to the pathname to the object */ - length += - ACPI_ROUND_UP_TO_NATIVE_WORD - (acpi_ns_get_pathname_length - (internal_object->reference.node)); + size = + acpi_ns_get_pathname_length(internal_object-> + reference.node); + if (!size) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } + + length += ACPI_ROUND_UP_TO_NATIVE_WORD(size); break; default: |