Re: [RFC/RFT] Raw access to serio ports (1/2)

Andrew Morton
2004-06-02T07:47:36Z

Dmitry Torokhov <dtor_core@ameritech.net> wrote:
>
> > The return values here are mucked up - this function returns `written'.
>
> Or an error code in negative notation - it's the standard practice for
> read/write. Am I missing something?

You want the function to return -ENODEV if !list->rawdev->serio

if (!list->rawdev->serio) {
retval = -ENODEV;
goto out;
}
...
out:
up(&rawdev_sem);
return written;
}

But it won't.