Message ID | 4BE7BE10.8080000@np.css.fujitsu.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 5fe5c0f..2ebc391 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -698,6 +698,9 @@ ssize_t erst_read_next(struct cper_record_header *record, size_t buflen) unsigned long flags; u64 record_id; + if (erst_disable) + return -ENODEV; + spin_lock_irqsave(&erst_lock, flags); rc = __erst_get_next_record_id(&record_id); if (rc) {