diff options
| author | Ovidiu Panait <ovidiu.panait.oss@gmail.com> | 2025-12-28 00:26:37 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-11 15:54:12 +0300 |
| commit | ab517a047b4ef6b62e4ddabfdd3549f19e4bc4c9 (patch) | |
| tree | 25a08dc88747556f1a689aa5ef07d2f27deedbe7 | |
| parent | eb757312ac1743e9b54b070f6cdc4b32bbe0c8ef (diff) | |
| download | linux-ab517a047b4ef6b62e4ddabfdd3549f19e4bc4c9.tar.xz | |
staging: axis-fifo: Remove unnecessary zero-length packet check
Remove the check for zero-length packets as this condition cannot
occur during normal operation. According to the Xilinx AXI4-Stream
FIFO Product Guide (PG080), in the Receive Length Register (RLR)
description: "The smallest packet that can be received is 1 byte."
A zero-length packet would indicate a bug in the IP core itself.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Link: https://patch.msgid.link/20251227212640.3321310-6-ovidiu.panait.oss@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/axis-fifo/axis-fifo.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index bf610e71253e..6d9ff6384168 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -193,11 +193,6 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf, bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET); words_available = bytes_available / sizeof(u32); - if (!bytes_available) { - dev_err(fifo->dt_device, "received a packet of length 0\n"); - ret = -EIO; - goto end_unlock; - } if (bytes_available > len) { dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n", |
