Re: [PATCH] USB: serial: xr: Add TIOCGRS485 and TIOCSRS485 ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 13, 2023 at 09:49:26AM +0200, Jarkko Sonninen wrote:
> > > +{
> > > +	void __user *argp = (void __user *)arg;
> > > +
> > > +	switch (cmd) {
> > > +	case TIOCGRS485:
> > > +		return xr_get_rs485_config(tty, argp);
> > > +	case TIOCSRS485:
> > > +		return xr_set_rs485_config(tty, argp);
> > > +	}
> > > +	return -ENOIOCTLCMD;
> > Wrong ioctl return value :(
> 
> What is the correct ioctl error return value ?
> ENOIOCTLCMD was used in most places in usb serial as an error return.

ENOTTY is the correct one for when an ioctl is not handled by the ioctl
call.

thanks,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux