diff --git a/drivers/servo/servo.c b/drivers/servo/servo.c index a3265c451c..8d473cd43b 100644 --- a/drivers/servo/servo.c +++ b/drivers/servo/servo.c @@ -39,7 +39,7 @@ int servo_set(servo_t *dev, unsigned int pos) if (pos > dev->max) { pos = dev->max; } - else (pos < dev->min) { + else if (pos < dev->min) { pos = dev->min; } return pwm_set(dev->device, dev->channel, pos);