• Corey Minyard's avatar
    ipmi: Rework SMI registration failure · 2512e40e
    Corey Minyard authored
    There were certain situations where ipmi_register_smi() would
    return a failure, but the interface would still be registered
    and would need to be unregistered.  This is obviously a bad
    design and resulted in an oops in certain failure cases.
    
    If the interface is started up in ipmi_register_smi(), then
    an error occurs, shut down the interface there so the
    cleanup can be done properly.
    
    Fix the various smi users, too.
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    Reported-by: default avatarJustin Ernst <justin.ernst@hpe.com>
    Tested-by: default avatarJustin Ernst <justin.ernst@hpe.com>
    Cc: Andrew Banman <abanman@hpe.com>
    Cc: Russ Anderson <russ.anderson@hpe.com>
    Cc: <stable@vger.kernel.org> # 4.18.x
    2512e40e
ipmi_si_intf.c 59 KB