Thread (7 messages) 7 messages, 4 authors, 2025-10-16

Re: [PATCH net v2] net: usb: lan78xx: fix use of improperly initialized dev->chipid in lan78xx_reset

From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: 2025-10-14 10:19:50
Also in: linux-kernel-mentees, linux-usb, lkml

On 13/10/2025 19:16, I Viswanath wrote:
dev->chipid is used in lan78xx_init_mac_address before it's initialized:

lan78xx_reset() {
     lan78xx_init_mac_address()
         lan78xx_read_eeprom()
             lan78xx_read_raw_eeprom() <- dev->chipid is used here

     dev->chipid = ... <- dev->chipid is initialized correctly here
}

Reorder initialization so that dev->chipid is set before calling
lan78xx_init_mac_address().

Fixes: a0db7d10b76e ("lan78xx: Add to handle mux control per chip id")
Signed-off-by: I Viswanath <redacted>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help