staging: comedi: usbduxsigma: checkpatch.pl cleanup (else not useful)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 16 Jul 2014 17:43:36 +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/usbduxsigma.c

index e869af4784c60796e6c4255f19b0062b3eaae1ae..94a09c16de8b1cdf6fc7c4e662989ee2759281e8 100644 (file)
@@ -1176,13 +1176,13 @@ static int usbduxsigma_pwm_period(struct comedi_device *dev,
        struct usbduxsigma_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;
        return 0;