Skip to content
  • Soren Brinkmann's avatar
    clk: Properly handle notifier return values · fb72a059
    Soren Brinkmann authored
    
    
    Notifiers may return NOTIFY_(OK|DONE|STOP|BAD). The CCF uses an
    inconsistent mix of checking against NOTIFY_STOP or NOTIFY_BAD.
    This inconsistency leaves errors undetected in some cases:
    clk_set_parent() calls __clk_speculate_rates(), which stops when it
    hits a NOTIFIER_BAD (STOP is ignored), and passes this value back to the
    caller.
    clk_set_parent() compares this return value against NOTIFY_STOP only,
    ignoring NOTIFY_BAD returns.
    
    Use NOTIFY_STOP_MASK to detect a negative notifier return value and
    document all four return value options.
    
    Signed-off-by: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
    Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
    fb72a059