diff options
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-mt6323.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/leds/leds-mt6323.c b/drivers/leds/leds-mt6323.c index 2a13e3161bf4..7b240771e45b 100644 --- a/drivers/leds/leds-mt6323.c +++ b/drivers/leds/leds-mt6323.c @@ -249,15 +249,6 @@ static int mt6323_led_set_blink(struct led_classdev *cdev, int ret; /* - * Units are in ms, if over the hardware able - * to support, fallback into software blink - */ - period = *delay_on + *delay_off; - - if (period > MT6323_MAX_PERIOD) - return -EINVAL; - - /* * LED subsystem requires a default user * friendly blink pattern for the LED so using * 1Hz duty cycle 50% here if without specific @@ -269,6 +260,15 @@ static int mt6323_led_set_blink(struct led_classdev *cdev, } /* + * Units are in ms, if over the hardware able + * to support, fallback into software blink + */ + period = *delay_on + *delay_off; + + if (period > MT6323_MAX_PERIOD) + return -EINVAL; + + /* * Calculate duty_hw based on the percentage of period during * which the led is ON. */ |