On Mon, Mar 13, 2017 at 12:37:32PM +1100, Tobin C. Harding wrote: > if (!tty || tty->magic != TTY_MAGIC) > - return rc; > + return -EIO; >
[ snip ] > if (!tty || tty->magic != TTY_MAGIC) > - return rc; > + return -EFAULT; My recolection is that these checks are totally unecessary. They're basically a really rubbish check for memory corruption. But could you make them return consistent error codes? -EIO is fine. > @@ -2427,7 +2423,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, > unsigned int cmd, > rc = tty_check_change(tty); > spin_unlock_irqrestore(&ch->ch_lock, flags); > if (rc) > - return rc; > + return -ENODEV; Please preserve the error code from tty_check_change() here (and similar places). regards, dan carpenter _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel