]> git.karo-electronics.de Git - linux-beck.git/commitdiff
target: cleanup transport_execute_tasks()
authorJörn Engel <joern@logfs.org>
Fri, 11 May 2012 14:33:41 +0000 (10:33 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 11 May 2012 22:01:48 +0000 (15:01 -0700)
The function is effectively void and doesn't need any goto logic.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c

index 59577568f9350684ecd06af9228eafe138499352..397e8bd4d5965f0b7db58174ca345f5458312155 100644 (file)
@@ -1970,7 +1970,7 @@ static inline int transport_execute_task_attr(struct se_cmd *cmd)
  * Called from fabric module context in transport_generic_new_cmd() and
  * transport_generic_process_write()
  */
-static int transport_execute_tasks(struct se_cmd *cmd)
+static void transport_execute_tasks(struct se_cmd *cmd)
 {
        int add_tasks;
        struct se_device *se_dev = cmd->se_dev;
@@ -1984,16 +1984,12 @@ static int transport_execute_tasks(struct se_cmd *cmd)
                 * attribute for the tasks of the received struct se_cmd CDB
                 */
                add_tasks = transport_execute_task_attr(cmd);
-               if (!add_tasks)
-                       goto execute_tasks;
-
-               __transport_execute_tasks(se_dev, cmd);
-               return 0;
+               if (add_tasks) {
+                       __transport_execute_tasks(se_dev, cmd);
+                       return;
+               }
        }
-
-execute_tasks:
        __transport_execute_tasks(se_dev, NULL);
-       return 0;
 }
 
 static int __transport_execute_tasks(struct se_device *dev, struct se_cmd *new_cmd)