]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulatory: remove redundant isalpha() check
authorJohannes Berg <johannes.berg@intel.com>
Mon, 3 Dec 2012 17:59:58 +0000 (18:59 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 3 Jan 2013 12:01:25 +0000 (13:01 +0100)
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>
net/wireless/reg.c

index 87daba95639c73a285bbb07b1916f2768e8dc07b..946cd5320ef91f8805cde4c0a5a6ac6de41a80e6 100644 (file)
@@ -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);