Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / net / econet / af_econet.c
index 4d66aac..8682656 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/types.h>
@@ -673,11 +674,12 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
                edev = dev->ec_ptr;
                if (edev == NULL) {
                        /* Magic up a new one. */
-                       edev = kzalloc(sizeof(struct ec_device), GFP_KERNEL);
+                       edev = kmalloc(sizeof(struct ec_device), GFP_KERNEL);
                        if (edev == NULL) {
                                err = -ENOMEM;
                                break;
                        }
+                       memset(edev, 0, sizeof(struct ec_device));
                        dev->ec_ptr = edev;
                } else
                        net2dev_map[edev->net] = NULL;