PATCH: fix bogus ioctl return in mtrr
This is fairly self explanatory - ENOIOCTLCMD is an internal code outside of the -1 to -511 range. The correct return for an unknown ioctl is -ENOTTY although some Linux devices return the incorrect -EINVAL result.
Patch-By Alan Cox <[email protected]>
OSDL Developer Certificate of Origin 1.0 included herein by reference
arch/i386/kernel/cpu/mtrr/if.c +1 -1
@@ -160,7 +160,7 @@switch (cmd) {default : -return -ENOIOCTLCMD ; +return -ENOTTY ;case MTRRIOC_ADD_ENTRY :if (!capable (CAP_SYS_ADMIN ))return -EPERM ;