clk: Don't write error code into divider register
authorAlex Frid <afrid@nvidia.com>
Tue, 25 Jul 2017 10:18:40 +0000 (13:18 +0300)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 1 Sep 2017 01:43:38 +0000 (18:43 -0700)
commit2316a7a33408b6e7b24e9d2a9a7c24af9a012289
tree0bc2dc4fd97f8927062274f8686d10bd164a5f23
parent6c264416c9b3dfd860aba9bcbe0ab4e0f061c0ca
clk: Don't write error code into divider register

Add a check for error returned by divider value calculation to avoid
writing error code into hw register.

Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Fixes: bca9690b9426 ("clk: divider: Make generic for usage elsewhere")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-divider.c