linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / irda / ircomm / ircomm_core.c
index ad6b6af..2868819 100644 (file)
@@ -29,6 +29,7 @@
  *     
  ********************************************************************/
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
@@ -115,10 +116,12 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
 
        IRDA_ASSERT(ircomm != NULL, return NULL;);
 
-       self = kzalloc(sizeof(struct ircomm_cb), GFP_ATOMIC);
+       self = kmalloc(sizeof(struct ircomm_cb), GFP_ATOMIC);
        if (self == NULL)
                return NULL;
 
+       memset(self, 0, sizeof(struct ircomm_cb));
+
        self->notify = *notify;
        self->magic = IRCOMM_MAGIC;