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

index 9da68225469e403cba43fd06a756f8c12ef6e138..b276ce485c5f39edcba3fdd491ca72f44c5772cf 100644 (file)
@@ -836,10 +836,8 @@ static uint16_t s626_get_mode_b(struct comedi_device *dev,
 static uint16_t s626_get_mode(struct comedi_device *dev,
                              unsigned int chan)
 {
-       if (chan < 3)
-               return s626_get_mode_a(dev, chan);
-       else
-               return s626_get_mode_b(dev, chan);
+       return (chan < 3) ? s626_get_mode_a(dev, chan)
+                         : s626_get_mode_b(dev, chan);
 }
 #endif
 
@@ -1047,10 +1045,8 @@ static uint16_t s626_get_enable(struct comedi_device *dev,
 {
        uint16_t crb = s626_debi_read(dev, S626_LP_CRB(chan));
 
-       if (chan < 3)
-               return S626_GET_CRB_CLKENAB_A(crb);
-       else
-               return S626_GET_CRB_CLKENAB_B(crb);
+       return (chan < 3) ? S626_GET_CRB_CLKENAB_A(crb)
+                         : S626_GET_CRB_CLKENAB_B(crb);
 }
 #endif