From: Johannes Berg <johannes.berg@intel.com>
Date: Mon, 3 Dec 2012 17:59:58 +0000 (+0100)
Subject: regulatory: remove redundant isalpha() check
X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=d4f2c8819a51f31ef0f929574ce8d80b323c6a76;p=openwrt%2Fstaging%2Fblogic.git

regulatory: remove redundant isalpha() check

toupper() only modifies lower-case letters, so
the isalpha() check is redundant; remove it.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 87daba95639c..946cd5320ef9 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1614,10 +1614,8 @@ static void reg_todo(struct work_struct *work)
 
 static void queue_regulatory_request(struct regulatory_request *request)
 {
-	if (isalpha(request->alpha2[0]))
-		request->alpha2[0] = toupper(request->alpha2[0]);
-	if (isalpha(request->alpha2[1]))
-		request->alpha2[1] = toupper(request->alpha2[1]);
+	request->alpha2[0] = toupper(request->alpha2[0]);
+	request->alpha2[1] = toupper(request->alpha2[1]);
 
 	spin_lock(&reg_requests_lock);
 	list_add_tail(&request->list, &reg_requests_list);