[PATCHv2] usb: gadget: f_tcm: ignore return value of queue_work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



queue_work() has never returned anything less than zero.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
---

This patch depends on the series adding configfs support to tcm usb gadget:
http://www.spinics.net/lists/target-devel/msg11215.html

v1..v2: removed unused "ret" variable

 drivers/usb/gadget/function/f_tcm.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index 9cb4a6b..c856850 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -1091,7 +1091,6 @@ static int usbg_submit_command(struct f_uas *fu,
 	struct se_cmd *se_cmd;
 	struct tcm_usbg_nexus *tv_nexus;
 	u32 cmd_len;
-	int ret;
 
 	if (cmd_iu->iu_id != IU_ID_COMMAND) {
 		pr_err("Unsupported type %d\n", cmd_iu->iu_id);
@@ -1156,9 +1155,7 @@ static int usbg_submit_command(struct f_uas *fu,
 	cmd->unpacked_lun = scsilun_to_int(&cmd_iu->lun);
 
 	INIT_WORK(&cmd->work, usbg_cmd_work);
-	ret = queue_work(tpg->workqueue, &cmd->work);
-	if (ret < 0)
-		goto err;
+	queue_work(tpg->workqueue, &cmd->work);
 
 	return 0;
 err:
@@ -1208,7 +1205,6 @@ static int bot_submit_command(struct f_uas *fu,
 	struct se_cmd *se_cmd;
 	struct tcm_usbg_nexus *tv_nexus;
 	u32 cmd_len;
-	int ret;
 
 	if (cbw->Signature != cpu_to_le32(US_BULK_CB_SIGN)) {
 		pr_err("Wrong signature on CBW\n");
@@ -1253,9 +1249,7 @@ static int bot_submit_command(struct f_uas *fu,
 	cmd->se_cmd.tag = le32_to_cpu(cmd->bot_tag);
 
 	INIT_WORK(&cmd->work, bot_cmd_work);
-	ret = queue_work(tpg->workqueue, &cmd->work);
-	if (ret < 0)
-		goto err;
+	queue_work(tpg->workqueue, &cmd->work);
 
 	return 0;
 err:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux