[PATCH 08/10] staging: rtl8192e: Remove check if channel_array[channel_plan].len != 0

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

 



channel_plan is constant COUNTRY_CODE_WORLD_WIDE_13. Remove equation to
check length of array as it is always not 0.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
 drivers/staging/rtl8192e/dot11d.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index bb7b5c793b26..b515008045bd 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -55,13 +55,11 @@ void dot11d_channel_map(u8 channel_plan, struct rtllib_device *ieee)
 
 	ieee->global_domain = false;
 
-	if (channel_array[channel_plan].len != 0) {
-		memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
-		       sizeof(GET_DOT11D_INFO(ieee)->channel_map));
-		for (i = 0; i < channel_array[channel_plan].len; i++) {
-			GET_DOT11D_INFO(ieee)->channel_map[channel_array
-					[channel_plan].channel[i]] = 1;
-		}
+	memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
+	       sizeof(GET_DOT11D_INFO(ieee)->channel_map));
+	for (i = 0; i < channel_array[channel_plan].len; i++) {
+		GET_DOT11D_INFO(ieee)->channel_map[channel_array
+				[channel_plan].channel[i]] = 1;
 	}
 
 	switch (channel_plan) {
-- 
2.42.0





[Index of Archives]     [Linux Driver Development]     [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