mfd: pm8xxx-pwm: simplify period search algorithm

Compare each search result (cur_err) directly with the best
result (best_err) without using local result in the loop for m.
This simplifies the code and makes it cleaner.

Change-Id: Icb6d19e1a14662b00bf7172ca6a7413fbe969cbc
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
1 file changed