Commit 8d93ff40 authored by I Viswanath's avatar I Viswanath Committed by Jakub Kicinski
Browse files

net: usb: lan78xx: fix use of improperly initialized dev->chipid in lan78xx_reset



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: a0db7d10 ("lan78xx: Add to handle mux control per chip id")
Signed-off-by: default avatarI Viswanath <viswanathiyyappan@gmail.com>
Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: default avatarKhalid Aziz <khalid@kernel.org>
Link: https://patch.msgid.link/20251013181648.35153-1-viswanathiyyappan@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5e655aad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment