Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 976e8418 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: Update conditional logic for validating read and write index"

parents 4eb5bb65 0334becd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ static int fifo_read(struct edge_info *einfo, void *_data, int len)
	uint32_t fifo_size = einfo->rx_fifo_size;
	uint32_t n;

	if (read_index > fifo_size && write_index > fifo_size)
	if (read_index >= fifo_size || write_index >= fifo_size)
		return 0;
	while (len) {
		ptr = einfo->rx_fifo + read_index;
@@ -531,7 +531,7 @@ static int fifo_write_body(struct edge_info *einfo, const void *_data,
	uint32_t fifo_size = einfo->tx_fifo_size;
	uint32_t n;

	if (read_index > fifo_size && *write_index > fifo_size)
	if (read_index >= fifo_size || *write_index >= fifo_size)
		return 0;
	while (len) {
		ptr = einfo->tx_fifo + *write_index;