[PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {}

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

 



An else block only contained an if statement. Replace that else
block by an else if block instead.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@xxxxxxxxx>
---
 drivers/staging/rtl8192u/r8192U_core.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index f81f267..0d169d0 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4563,15 +4563,13 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 		pstats->SignalStrength =
 			precord_stats->SignalStrength =
 			(u8)(rtl819x_signal_scale_mapping((long)pwdb_all));
-	} else {
+	} else if (rf_rx_num != 0) {
 		/* We can judge RX path number now. */
-		if (rf_rx_num != 0) {
-			long currsig = (total_rssi /= rf_rx_num);
+		long currsig = (total_rssi /= rf_rx_num);
 
-			pstats->SignalStrength =
-				precord_stats->SignalStrength =
-				(u8)(rtl819x_signal_scale_mapping(currsig));
-		}
+		pstats->SignalStrength =
+			precord_stats->SignalStrength =
+			(u8)(rtl819x_signal_scale_mapping(currsig));
 	}
 }	/* QueryRxPhyStatus8190Pci */
 
-- 
2.5.1

_______________________________________________
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