[PATCH 4/4] [USB] UASP: Return -ENODEV instead of -1 on error

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

 



Return -ENODEV instead of -1 on configuration
errors when discovering the attached device.

Signed-off-by: Luben Tuikov <ltuikov@xxxxxxxxx>
---
 drivers/usb/storage/uasp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/storage/uasp.c b/drivers/usb/storage/uasp.c
index 40ee5a4..eb8933f 100644
--- a/drivers/usb/storage/uasp.c
+++ b/drivers/usb/storage/uasp.c
@@ -943,7 +943,7 @@ static int uasp_ep_conf(struct uasp_tport_info *tpinfo)
 	    tpinfo->eps[2] == NULL || tpinfo->eps[3] == NULL) {
 		dev_err(&udev->dev, "%s: one or more endpoints are missing\n",
 			__func__);
-		return -1;
+		return -ENODEV;
 	}
 
 	tpinfo->cmd_pipe = usb_sndbulkpipe(udev,
@@ -968,7 +968,7 @@ static int uasp_ep_conf(struct uasp_tport_info *tpinfo)
 		
 		if (tpinfo->max_streams <= 1) {
 			dev_err(&udev->dev, "%s: no streams\n", __func__);
-			return -1;
+			return -ENODEV;
 		}
 		
 		tpinfo->use_streams = 1;
@@ -985,7 +985,7 @@ static int uasp_ep_conf(struct uasp_tport_info *tpinfo)
 				"%s: Couldn't allocate %d streams (%d)\n",
 				__func__, tpinfo->max_streams,
 				tpinfo->num_streams);
-			return -1;
+			return -ENODEV;
 		}
 
 		uasp_set_max_cmds(tpinfo);
-- 
1.7.0.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