summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2025-09-24 21:56:00 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2025-09-29 00:11:59 +0200
commit8a1f3fd1a89cd1d4acccb0181346ad212a275a69 (patch)
tree76cb8a5663e8c6bb6ab0d5de80349ed6f4e310b6 /drivers/i3c
parent649764145b70a0328fc020fe31fc80594761a707 (diff)
i3c: master: adi: fix number of bytes written to fifo
adi_i3c_master_wr_to_tx_fifo computes the maximum number of bytes that can be sent to the fifo but never makes use of it, actually limit the number of bytes sent. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202509190505.fKGvEJRa-lkp@intel.com/ Reviewed-by: Jorge Marques <jorge.marques@analog.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250924195600.122142-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/adi-i3c-master.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
index 18597ba1f1c3..82ac0b3d057a 100644
--- a/drivers/i3c/master/adi-i3c-master.c
+++ b/drivers/i3c/master/adi-i3c-master.c
@@ -135,7 +135,7 @@ static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
n = readl(master->regs + REG_SDO_FIFO_ROOM);
m = min(n, nbytes);
- i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, nbytes);
+ i3c_writel_fifo(master->regs + REG_SDO_FIFO, buf, m);
}
static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,