summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlok Tiwari <alok.a.tiwari@oracle.com>2025-07-10 10:38:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-24 08:56:30 +0200
commit20648ff4a203b335420438aa28fd9aa86d47cda7 (patch)
tree296fa44830ed5a00ac3e737cd65b42a6a90955ee
parent894780d6dd3ef4edc7583047dc210a60d7864c97 (diff)
net: emaclite: Fix missing pointer increment in aligned_read()
[ Upstream commit 7727ec1523d7973defa1dff8f9c0aad288d04008 ] Add missing post-increment operators for byte pointers in the loop that copies remaining bytes in xemaclite_aligned_read(). Without the increment, the same byte was written repeatedly to the destination. This update aligns with xemaclite_aligned_write() Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://patch.msgid.link/20250710173849.2381003-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_emaclite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 940452d0a4d2..258096543b08 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -285,7 +285,7 @@ static void xemaclite_aligned_read(u32 *src_ptr, u8 *dest_ptr,
/* Read the remaining data */
for (; length > 0; length--)
- *to_u8_ptr = *from_u8_ptr;
+ *to_u8_ptr++ = *from_u8_ptr++;
}
}