aboutsummaryrefslogtreecommitdiff
path: root/arch/avr32/boards/favr-32/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/boards/favr-32/setup.c')
-rw-r--r--arch/avr32/boards/favr-32/setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c
index 7b1f2cd8540..1f121497b51 100644
--- a/arch/avr32/boards/favr-32/setup.c
+++ b/arch/avr32/boards/favr-32/setup.c
@@ -298,8 +298,10 @@ static int __init set_abdac_rate(struct platform_device *pdev)
*/
retval = clk_round_rate(pll1,
CONFIG_BOARD_FAVR32_ABDAC_RATE * 256 * 16);
- if (retval < 0)
+ if (retval <= 0) {
+ retval = -EINVAL;
goto out_abdac;
+ }
retval = clk_set_rate(pll1, retval);
if (retval != 0)