summaryrefslogtreecommitdiff
path: root/drivers/acpi/apei/erst.c
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-03 00:26:10 -0700
committerRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-03 00:26:10 -0700
commitd121f07691415df824e6b60520f782f6d13b3c81 (patch)
tree422ad3cc6fd631604fef4e469e49bacba8202e52 /drivers/acpi/apei/erst.c
parent59858d3d54cfad1f8db67c2c07e4dd33bb6ed955 (diff)
parent569d0365f571fa6421a5c80bc30d1b2cdab857fe (diff)
Merge branch 'for-4.16/dax' into libnvdimm-for-next
Diffstat (limited to 'drivers/acpi/apei/erst.c')
-rw-r--r--drivers/acpi/apei/erst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 6742f6c68034..9bff853e85f3 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -1007,7 +1007,7 @@ skip:
/* The record may be cleared by others, try read next record */
if (len == -ENOENT)
goto skip;
- else if (len < sizeof(*rcd)) {
+ else if (len < 0 || len < sizeof(*rcd)) {
rc = -EIO;
goto out;
}