• Russell King's avatar
    NET: fec: only enable napi if we are successful · ce5eaf02
    Russell King authored
    If napi is left enabled after a failed attempt to bring the interface
    up, we BUG:
    
    fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
    libphy: PHY fixed-0:00 not found
    fec 2188000.ethernet eth0: could not attach to PHY
    ------------[ cut here ]------------
    kernel BUG at include/linux/netdevice.h:502!
    Internal error: Oops - BUG: 0 [#1] SMP ARM
    ...
    PC is at fec_enet_open+0x4d0/0x500
    LR is at __dev_open+0xa4/0xfc
    
    Only enable napi after we are past all the failure paths.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ce5eaf02
fec_main.c 60.6 KB