[NETFILTER]: ctnetlink: Fix subsystem used for expectation events
[pandora-kernel.git] / net / socket.c
index 0dde6da..b38a263 100644 (file)
@@ -900,6 +900,13 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
                        break;
                default:
                        err = sock->ops->ioctl(sock, cmd, arg);
+
+                       /*
+                        * If this ioctl is unknown try to hand it down
+                        * to the NIC driver.
+                        */
+                       if (err == -ENOIOCTLCMD)
+                               err = dev_ioctl(cmd, argp);
                        break;
        }
        return err;
@@ -986,7 +993,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
 
        if (on)
        {
-               fna=(struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
+               fna = kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
                if(fna==NULL)
                        return -ENOMEM;
        }