]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/vmcp: return -ENOTTY for unknown ioctl commands
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 7 Aug 2017 13:16:16 +0000 (15:16 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 9 Aug 2017 13:09:37 +0000 (09:09 -0400)
Return -ENOTTY for unknown ioctl commands instead of
-ENOIOCTLCMD. This isn't that much of difference, since common code
will translate -ENOIOCTLCMD to -ENOTTY anyway, but this way it seems
to be more obvious what is happening (at least to me).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/vmcp.c

index 18b30119a70e11494251b101b3ee655a31bafbff..30fd474c86b3889602aa1ccea9d5b37802369d44 100644 (file)
@@ -231,7 +231,7 @@ static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return put_user(temp, argp);
        default:
                mutex_unlock(&session->mutex);
-               return -ENOIOCTLCMD;
+               return -ENOTTY;
        }
 }