queue_work() has never returned anything less than zero.

Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
---

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

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

diff --git a/drivers/usb/gadget/function/f_tcm.c 
b/drivers/usb/gadget/function/f_tcm.c
index 9cb4a6b..508f271 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -1156,9 +1156,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:
@@ -1253,9 +1251,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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to