]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iwlwifi: fw: simplify the iwl_fw_dbg_collect_trig()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Wed, 9 Dec 2020 09:37:34 +0000 (17:37 +0800)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 25 Jun 2025 07:57:33 +0000 (10:57 +0300)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Link: https://patch.msgid.link/20201209093734.20836-1-zhengyongjun3@huawei.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c

index 98ad020014d9d4be05e0c658a600d51a5cf931c9..fd60a68161508192ae4bc9cf7e2f48d1cf549f43 100644 (file)
@@ -3067,7 +3067,7 @@ int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
                            struct iwl_fw_dbg_trigger_tlv *trigger,
                            const char *fmt, ...)
 {
-       int ret, len = 0;
+       int len = 0;
        char buf[64];
 
        if (iwl_trans_dbg_ini_valid(fwrt->trans))
@@ -3089,13 +3089,8 @@ int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
                len = strlen(buf) + 1;
        }
 
-       ret = iwl_fw_dbg_collect(fwrt, le32_to_cpu(trigger->id), buf, len,
-                                trigger);
-
-       if (ret)
-               return ret;
-
-       return 0;
+       return iwl_fw_dbg_collect(fwrt, le32_to_cpu(trigger->id), buf, len,
+                                 trigger);
 }
 IWL_EXPORT_SYMBOL(iwl_fw_dbg_collect_trig);