*     @p: pointer to result
  *
  *     Obtain the modem status bits from the tty driver if the feature
- *     is supported. Return -EINVAL if it is not available.
+ *     is supported. Return -ENOTTY if it is not available.
  *
  *     Locking: none (up to the driver)
  */
 
 static int tty_tiocmget(struct tty_struct *tty, int __user *p)
 {
-       int retval = -EINVAL;
+       int retval = -ENOTTY;
 
        if (tty->ops->tiocmget) {
                retval = tty->ops->tiocmget(tty);
  *     @p: pointer to desired bits
  *
  *     Set the modem status bits from the tty driver if the feature
- *     is supported. Return -EINVAL if it is not available.
+ *     is supported. Return -ENOTTY if it is not available.
  *
  *     Locking: none (up to the driver)
  */
        unsigned int set, clear, val;
 
        if (tty->ops->tiocmset == NULL)
-               return -EINVAL;
+               return -ENOTTY;
 
        retval = get_user(val, p);
        if (retval)
        if (tty->ops->get_icount)
                return tty->ops->get_icount(tty, icount);
        else
-               return -EINVAL;
+               return -ENOTTY;
 }
 EXPORT_SYMBOL_GPL(tty_get_icount);
 
 
  *
  *     Called when the device receives a TIOCGICOUNT ioctl. Passed a kernel
  *     structure to complete. This method is optional and will only be called
- *     if provided (otherwise EINVAL will be returned).
+ *     if provided (otherwise ENOTTY will be returned).
  */
 
 #include <linux/export.h>