Commit 00ea1970 authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Greg Kroah-Hartman

coresight: Fix check in coresight_tmc_etr_buf_insert_barrier_packet

We request for "CORESIGHT_BARRIER_PKT_SIZE" length and we should
be happy when we get that size.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a748ddd1
...@@ -807,7 +807,7 @@ tmc_etr_buf_insert_barrier_packet(struct etr_buf *etr_buf, u64 offset) ...@@ -807,7 +807,7 @@ tmc_etr_buf_insert_barrier_packet(struct etr_buf *etr_buf, u64 offset)
len = tmc_etr_buf_get_data(etr_buf, offset, len = tmc_etr_buf_get_data(etr_buf, offset,
CORESIGHT_BARRIER_PKT_SIZE, &bufp); CORESIGHT_BARRIER_PKT_SIZE, &bufp);
if (WARN_ON(len <= CORESIGHT_BARRIER_PKT_SIZE)) if (WARN_ON(len < CORESIGHT_BARRIER_PKT_SIZE))
return -EINVAL; return -EINVAL;
coresight_insert_barrier_packet(bufp); coresight_insert_barrier_packet(bufp);
return offset + CORESIGHT_BARRIER_PKT_SIZE; return offset + CORESIGHT_BARRIER_PKT_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment