• Y
    regulator: core: Remove redundant checks · 5b175952
    Yadwinder Singh Brar 提交于
    In function _regulator_do_set_voltage(), old_selector gets intialised only
    if (_regulator_is_enabled(rdev) && rdev->desc->ops->set_voltage_time_sel &&
    rdev->desc->ops->get_voltage_sel)) is true.
    
    Before calling set_voltage_time_sel() we checks if (old_selector >= 0) and it
    will true if it got intialised properly. so we don't need to check again
    _regulator_is_enabled(rdev) && rdev->desc->ops->set_voltage_time_sel before
    calling set_voltage_time_sel().
    Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com>
    Signed-off-by: NMark Brown <broonie@linaro.org>
    5b175952
core.c 102.7 KB