staging: comedi: usbdux: checkpatch.pl cleanup (else not useful)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 16 Jul 2014 17:43:35 +0000 (10:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:34:23 +0000 (13:34 -0700)
Fix the checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbdux.c

index 5f65e4213c6e5841f55ad9f1d58cde7ecfbcdd4b..053bc50905303bcb5839f3b753435a60c43487a9 100644 (file)
@@ -1327,13 +1327,13 @@ static int usbdux_pwm_period(struct comedi_device *dev,
        struct usbdux_private *devpriv = dev->private;
        int fx2delay = 255;
 
-       if (period < MIN_PWM_PERIOD) {
+       if (period < MIN_PWM_PERIOD)
                return -EAGAIN;
-       } else {
-               fx2delay = (period / (6 * 512 * 1000 / 33)) - 6;
-               if (fx2delay > 255)
-                       return -EAGAIN;
-       }
+
+       fx2delay = (period / (6 * 512 * 1000 / 33)) - 6;
+       if (fx2delay > 255)
+               return -EAGAIN;
+
        devpriv->pwm_delay = fx2delay;
        devpriv->pwm_period = period;