]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
IB/iser: Remove unnecessary local variable
authorLi Jun <lijun01@kylinos.cn>
Wed, 4 Jun 2025 10:20:49 +0000 (18:20 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 12 Jun 2025 08:28:04 +0000 (04:28 -0400)
The 'error' variable is no longer needed,as iscsi_iser_mtask_xmit can
return the result of iser_send_control(conn,task) directly.

Signed-off-by: Li Jun <lijun01@kylinos.cn>
Link: https://patch.msgid.link/20250604102049.130039-1-lijun01@kylinos.cn
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/iser/iscsi_iser.c

index a5be6f1ba12b86f23435b3cacdbaa92b4243513a..2e3c0516ce8fe2bfe6e5a3e9970aab3a1b773b68 100644 (file)
@@ -267,19 +267,15 @@ static int iscsi_iser_task_init(struct iscsi_task *task)
 static int iscsi_iser_mtask_xmit(struct iscsi_conn *conn,
                                 struct iscsi_task *task)
 {
-       int error = 0;
-
        iser_dbg("mtask xmit [cid %d itt 0x%x]\n", conn->id, task->itt);
 
-       error = iser_send_control(conn, task);
-
        /* since iser xmits control with zero copy, tasks can not be recycled
         * right after sending them.
         * The recycling scheme is based on whether a response is expected
         * - if yes, the task is recycled at iscsi_complete_pdu
         * - if no,  the task is recycled at iser_snd_completion
         */
-       return error;
+       return iser_send_control(conn, task);
 }
 
 static int iscsi_iser_task_xmit_unsol_data(struct iscsi_conn *conn,