[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfcxGebTKxVUJONY@ayush-HP-Pavilion-Gaming-Laptop-15-ec0xxx>
Date: Sun, 17 Mar 2024 23:36:17 +0530
From: Ayush Tiwari <ayushtiw0110@...il.com>
To: Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev
Cc: outreachy@...ts.linux.dev
Subject: [PATCH] staging: rtl8712: aggregate conditional statements
Aggregate the two conditional statements into one conditional
statement to reduce code length and simplify the code structure.
Signed-off-by: Ayush Tiwari <ayushtiw0110@...il.com>
---
drivers/staging/rtl8712/ieee80211.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 7d8f1a29d18a..3b7a72bb6fc7 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -147,9 +147,7 @@ static uint r8712_get_rateset_len(u8 *rateset)
uint i = 0;
while (1) {
- if ((rateset[i]) == 0)
- break;
- if (i > 12)
+ if ((rateset[i] == 0) || (i > 12))
break;
i++;
}
--
2.40.1
Powered by blists - more mailing lists