aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/apei/erst-dbg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c
index 903549df809b..04ab5c9d3ced 100644
--- a/drivers/acpi/apei/erst-dbg.c
+++ b/drivers/acpi/apei/erst-dbg.c
@@ -111,8 +111,17 @@ retry_next:
111 if (rc) 111 if (rc)
112 goto out; 112 goto out;
113 /* no more record */ 113 /* no more record */
114 if (id == APEI_ERST_INVALID_RECORD_ID) 114 if (id == APEI_ERST_INVALID_RECORD_ID) {
115 /*
116 * If the persistent store is empty initially, the function
117 * 'erst_read' below will return "-ENOENT" value. This causes
118 * 'retry_next' label is entered again. The returned value
119 * should be zero indicating the read operation is EOF.
120 */
121 len = 0;
122
115 goto out; 123 goto out;
124 }
116retry: 125retry:
117 rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len); 126 rc = len = erst_read(id, erst_dbg_buf, erst_dbg_buf_len);
118 /* The record may be cleared by others, try read next record */ 127 /* The record may be cleared by others, try read next record */