From: Luben Tuikov <ltuikov@yahoo.com>
To: Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH 4/4] [USB] UASP: Return -ENODEV instead of -1 on error
Date: Wed, 8 Dec 2010 15:57:18 -0800 (PST) [thread overview]
Message-ID: <868332.80097.qm@web31803.mail.mud.yahoo.com> (raw)
Return -ENODEV instead of -1 on configuration
errors when discovering the attached device.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
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
reply other threads:[~2010-12-08 23:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868332.80097.qm@web31803.mail.mud.yahoo.com \
--to=ltuikov@yahoo.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome