clk: Fix best_parent_rate after moving code into a separate function