]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mwifiex: remove an unnecessary check
authorDan Carpenter <error27@gmail.com>
Mon, 25 May 2026 06:56:36 +0000 (09:56 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 28 May 2026 07:46:23 +0000 (09:46 +0200)
We know that "start_raw" is true so remove this check and pull the code
in an tab.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/ahPypOdz-KXh5KAJ@stanley.mountain
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/marvell/mwifiex/sta_cmd.c

index 70ce31d7c76e536edd63d19a8e87ce093a70464c..623ddde8c8e59003b3dda66e300f61587249b0f5 100644 (file)
@@ -1568,28 +1568,23 @@ int mwifiex_send_rgpower_table(struct mwifiex_private *priv, const u8 *data,
                        return -EINVAL;
                }
 
-               if (start_raw) {
-                       while ((*pos != '\r' && *pos != '\n') &&
-                              (token = strsep((char **)&pos, " "))) {
-                               if (ptr - hostcmd->cmd >=
-                                   MWIFIEX_SIZE_OF_CMD_BUFFER) {
-                                       mwifiex_dbg(
-                                               adapter, ERROR,
-                                               "%s: hostcmd is larger than %d, aborting\n",
-                                               __func__, MWIFIEX_SIZE_OF_CMD_BUFFER);
-                                       return -ENOMEM;
-                               }
+               while ((*pos != '\r' && *pos != '\n') &&
+                      (token = strsep((char **)&pos, " "))) {
+                       if (ptr - hostcmd->cmd >= MWIFIEX_SIZE_OF_CMD_BUFFER) {
+                               mwifiex_dbg(adapter, ERROR,
+                                       "%s: hostcmd is larger than %d, aborting\n",
+                                       __func__, MWIFIEX_SIZE_OF_CMD_BUFFER);
+                               return -ENOMEM;
+                       }
 
-                               ret = kstrtou8(token, 16, ptr);
-                               if (ret < 0) {
-                                       mwifiex_dbg(
-                                               adapter, ERROR,
-                                               "%s: failed to parse hostcmd %d token: %s\n",
-                                               __func__, ret, token);
-                                       return ret;
-                               }
-                               ptr++;
+                       ret = kstrtou8(token, 16, ptr);
+                       if (ret < 0) {
+                               mwifiex_dbg(adapter, ERROR,
+                                       "%s: failed to parse hostcmd %d token: %s\n",
+                                       __func__, ret, token);
+                               return ret;
                        }
+                       ptr++;
                }
        }