On Tue, Mar 07, 2017 at 08:08:44PM +0300, Dan Carpenter wrote: > On Tue, Mar 07, 2017 at 05:33:08PM +1100, Tobin C. Harding wrote: > > @@ -1668,20 +1669,20 @@ static int dgnc_tty_tiocmget(struct tty_struct *tty) > > { > > struct channel_t *ch; > > struct un_t *un; > > - int result = -EIO; > > + int rc = -EIO; > > unsigned char mstat = 0; > > unsigned long flags; > > > > if (!tty || tty->magic != TTY_MAGIC) > > - return result; > > + return rc; > > > > It's better to just do "return -EIO;" That way all the information is > on one line, and you don't need to scroll back to find out what it's > returning. > > > @@ -1987,20 +1990,21 @@ static int dgnc_tty_digigeta(struct tty_struct *tty, > > struct un_t *un; > > struct digi_t tmp; > > unsigned long flags; > > + int rc = -EFAULT; > > > > if (!retinfo) > > - return -EFAULT; > > + return rc; > > The original is better here. Awesome, thanks. Will include in v3. thanks, Tobin. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel