]> git.baikalelectronics.ru Git - kernel.git/commit
sh: clkfwk: Fix up rate rounding error handling.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 1 Nov 2010 19:30:31 +0000 (15:30 -0400)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 1 Nov 2010 19:30:31 +0000 (15:30 -0400)
commitf4ecfe1c51e3f40375d7c9be8e10f986f3aac1ba
tree1efb33a6f02df2c70f8cb8aa3c5cca52c04c9aa2
parentaa1e00784858e6bb768310d52b919ffdc9506825
sh: clkfwk: Fix up rate rounding error handling.

According to the linux/clk.h definition we should be handing back an
errno value or a valid rate. This fixes up the case where 0 can be
returned for invalid frequencies or cases where rounding has no
selectable candidate.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/clk/core.c