From: H Hartley Sweeten Date: Wed, 16 Jul 2014 17:43:36 +0000 (-0700) Subject: staging: comedi: usbduxsigma: checkpatch.pl cleanup (else not useful) X-Git-Tag: v3.17-rc1~123^2~639 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=182157e1e5c66e6e647a4f1be99a6c674008e20b;p=karo-tx-linux.git staging: comedi: usbduxsigma: checkpatch.pl cleanup (else not useful) Fix the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index e869af4784c6..94a09c16de8b 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -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;