• Russell King's avatar
    pcmcia: soc_common: restore previous socket state on error · 6ac95d82
    Russell King authored
    If an attempt to set a socket state returns an error, restore the
    previous socket state.  If restoring the previous socket state
    fails, warn about this.
    
    This allows us to have simple error handling in the socket state
    configuration handlers - there is no need for every handler
    implementation to manually undo the updates, which can be complex
    when regulators are involved.
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    6ac95d82
soc_common.c 22.4 KB