]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: emaclite: Fix missing pointer increment in aligned_read()
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Thu, 10 Jul 2025 17:38:46 +0000 (10:38 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Jul 2025 23:37:06 +0000 (16:37 -0700)
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>
drivers/net/ethernet/xilinx/xilinx_emaclite.c

index ecf47107146dc75c4e8b38986ef92f5c3e6d1e00..4719d40a63ba38c7a37d0d85af5e386c12c0337a 100644 (file)
@@ -286,7 +286,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++;
        }
 }