• Peter Rosin's avatar
    i2c: mux: demux-pinctrl: do not deactivate a master that is not active · 1a22aabf
    Peter Rosin authored
    Attempting to rollback the activation of the current master when
    the current master has not been activated is bad. priv->cur_chan
    and priv->cur_adap are both still zeroed out and the rollback
    may result in attempts to revert an of changeset that has not been
    applied and do result in calls to both del and put the zeroed out
    i2c_adapter. Maybe it crashes, or whatever, but it's bad in any
    case.
    
    Fixes: e9d1a0a4 ("i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'")
    Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
    Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
    1a22aabf
i2c-demux-pinctrl.c 8.27 KB