]> err.no Git - linux-2.6/blobdiff - net/irda/irda_device.c
[PATCH] inotify: fix deadlock found by lockdep
[linux-2.6] / net / irda / irda_device.c
index e3debbdb67f5a0272db139cda75eef326e0db71b..7e7a31798d8d04855fead92b2ebdb444f85ea26a 100644 (file)
@@ -29,7 +29,6 @@
  *
  ********************************************************************/
 
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/proc_fs.h>
 #include <linux/skbuff.h>
@@ -402,12 +401,10 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type)
        }
 
        /* Allocate dongle info for this instance */
-       dongle = kmalloc(sizeof(dongle_t), GFP_KERNEL);
+       dongle = kzalloc(sizeof(dongle_t), GFP_KERNEL);
        if (!dongle)
                goto out;
 
-       memset(dongle, 0, sizeof(dongle_t));
-
        /* Bind the registration info to this particular instance */
        dongle->issue = reg;
        dongle->dev = dev;