[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090624211924.GG5299@vespa.holoscopio.com>
Date: Wed, 24 Jun 2009 18:19:25 -0300
From: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
To: Oliver Neukum <oliver@...kum.org>
Cc: Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
alan@...rguk.ukuu.org.uk, linux-usb@...r.kernel.org
Subject: Re: [PATCH 1/3] Return ENODEV instead of EINVAL when trying to
open ACM device.
On Wed, Jun 24, 2009 at 11:17:04PM +0200, Oliver Neukum wrote:
> 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@...oscopio.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@...kum.org>
>
Or if the device has never been connected at all.
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists