Skip to content

Commit 594ff03

Browse files
fs: bm_zms: correct error check for ring_buf_get()
ring_buf_get() returns the size retrieved and will never be negative. Signed-off-by: Eivind Jølsgard <[email protected]>
1 parent 8b2b9b9 commit 594ff03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/fs/bm_zms/bm_zms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void queue_process(void)
138138
NRFX_CRITICAL_SECTION_ENTER();
139139
rc = ring_buf_get(&zms_fifo, (uint8_t *)&cur_op, sizeof(zms_op_t));
140140
NRFX_CRITICAL_SECTION_EXIT();
141-
if (rc < 0) {
141+
if (rc != sizeof(zms_op_t)) {
142142
result = -EIO;
143143
goto completed;
144144
}

0 commit comments

Comments
 (0)