aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/rscalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/rscalc.c')
-rw-r--r--drivers/acpi/acpica/rscalc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 7816d4eef04e..72077fa1eea5 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -202,6 +202,12 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
202 return_ACPI_STATUS(AE_AML_INVALID_RESOURCE_TYPE); 202 return_ACPI_STATUS(AE_AML_INVALID_RESOURCE_TYPE);
203 } 203 }
204 204
205 /* Sanity check the length. It must not be zero, or we loop forever */
206
207 if (!resource->length) {
208 return_ACPI_STATUS(AE_AML_BAD_RESOURCE_LENGTH);
209 }
210
205 /* Get the base size of the (external stream) resource descriptor */ 211 /* Get the base size of the (external stream) resource descriptor */
206 212
207 total_size = acpi_gbl_aml_resource_sizes[resource->type]; 213 total_size = acpi_gbl_aml_resource_sizes[resource->type];