summaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities/utalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utalloc.c')
-rw-r--r--drivers/acpi/utilities/utalloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index 3dfb8a442b26..7dcb67e0b215 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -242,6 +242,12 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
{
acpi_status status = AE_OK;
+ /* Parameter validation */
+
+ if (!buffer || !required_length) {
+ return (AE_BAD_PARAMETER);
+ }
+
switch (buffer->length) {
case ACPI_NO_BUFFER: