From: Oliver Neukum <oliver@neukum.org>
To: Greg KH <gregkh@suse.de>
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/3] Return ENODEV instead of EINVAL when trying to open ACM device.
Date: Wed, 24 Jun 2009 23:17:04 +0200 [thread overview]
Message-ID: <200906242317.05307.oliver@neukum.org> (raw)
In-Reply-To: <20090624204015.GD28516@suse.de>
Am Mittwoch, 24. Juni 2009 22:40:15 schrieb Greg KH:
> On Wed, Jun 24, 2009 at 08:31:15AM -0300, Thadeu Lima de Souza Cascardo wrote:
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> > ---
> > drivers/usb/class/cdc-acm.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> > index 38bfdb0..02eb60b 100644
> > --- a/drivers/usb/class/cdc-acm.c
> > +++ b/drivers/usb/class/cdc-acm.c
> > @@ -550,7 +550,7 @@ static void acm_waker(struct work_struct *waker)
> > static int acm_tty_open(struct tty_struct *tty, struct file *filp)
> > {
> > struct acm *acm;
> > - int rv = -EINVAL;
> > + int rv = -ENODEV;
>
> Why is this needed?
The current error return is incorrect. If the table entry is gone, the
device has been disconnected, hence -ENODEV.
Regards
Oliver
Acked-by: Oliver Neukum <oliver@neukum.org>
next prev parent reply other threads:[~2009-06-24 21:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 11:31 Thadeu Lima de Souza Cascardo
2009-06-24 11:31 ` [PATCH 2/3] Fix oops when closing ACM tty device right after open has failed Thadeu Lima de Souza Cascardo
2009-06-24 11:31 ` [PATCH 3/3] Fix oops when unexisting usb serial device is opened Thadeu Lima de Souza Cascardo
2009-06-24 20:41 ` Greg KH
2009-06-24 20:41 ` [PATCH 2/3] Fix oops when closing ACM tty device right after open has failed Greg KH
2009-06-24 21:35 ` Thadeu Lima de Souza Cascardo
2009-06-24 21:37 ` Greg KH
2009-06-24 20:40 ` [PATCH 1/3] Return ENODEV instead of EINVAL when trying to open ACM device Greg KH
2009-06-24 21:17 ` Oliver Neukum [this message]
2009-06-24 21:19 ` Thadeu Lima de Souza Cascardo
2009-06-24 21:33 Thadeu Lima de Souza Cascardo
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=200906242317.05307.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cascardo@holoscopio.com \
--cc=gregkh@suse.de \
--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
all inboxes | Powered by JetHome®