]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/socket.c
vfs: fix up ENOIOCTLCMD error handling
[linux-2.6.git] / net / socket.c
index 2877647f347b06e75aaaa7fd355799a43cd65bf3..a0053750e37a5ee5137ff8b72a88c71ec07a34a5 100644 (file)
@@ -2883,7 +2883,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
 
                return dev_ioctl(net, cmd, uifr);
        default:
-               return -EINVAL;
+               return -ENOIOCTLCMD;
        }
 }
 
@@ -3210,20 +3210,6 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
                return sock_do_ioctl(net, sock, cmd, arg);
        }
 
-       /* Prevent warning from compat_sys_ioctl, these always
-        * result in -EINVAL in the native case anyway. */
-       switch (cmd) {
-       case SIOCRTMSG:
-       case SIOCGIFCOUNT:
-       case SIOCSRARP:
-       case SIOCGRARP:
-       case SIOCDRARP:
-       case SIOCSIFLINK:
-       case SIOCGIFSLAVE:
-       case SIOCSIFSLAVE:
-               return -EINVAL;
-       }
-
        return -ENOIOCTLCMD;
 }