[PATCH 12/15] Staging: bcm: led_control.c: Replaced doubled if-check by logical OR in one check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/led_control.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c
index 8a59115..ae49a59 100644
--- a/drivers/staging/bcm/led_control.c
+++ b/drivers/staging/bcm/led_control.c
@@ -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) {
-- 
2.0.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux