]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Staging: bcm: led_control.c: Replaced doubled if-check by logical OR in one check
authorMatthias Beyer <mail@beyermatthias.de>
Mon, 23 Jun 2014 19:18:28 +0000 (21:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 01:02:14 +0000 (21:02 -0400)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/led_control.c

index 8a59115c24f48530e6c9977a10a0dae326d3c0f0..ae49a5976c835dcf21ea106d04c7acbe0d123d2b 100644 (file)
@@ -116,14 +116,11 @@ static INT blink_in_normal_bandwidth(struct bcm_mini_adapter *ad,
 
        if (*time > 0) {
                /* Blink both Tx and Rx LEDs */
-               if (LED_Blink(ad, 1 << GPIO_Num_tx, uiTxLedIndex, *timeout,
-                             *time, currdriverstate) == EVENT_SIGNALED)
-                       return EVENT_SIGNALED;
-
-               if (LED_Blink(ad, 1 << GPIO_Num_rx, uiRxLedIndex, *timeout,
-                             *time, currdriverstate) == EVENT_SIGNALED)
+               if ((LED_Blink(ad, 1 << GPIO_Num_tx, uiTxLedIndex, *timeout,
+                             *time, currdriverstate) == EVENT_SIGNALED) ||
+                   (LED_Blink(ad, 1 << GPIO_Num_rx, uiRxLedIndex, *timeout,
+                             *time, currdriverstate) == EVENT_SIGNALED))
                        return EVENT_SIGNALED;
-
        }
 
        if (*time == *time_tx) {