[IRDA]: Use kmemdup where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index ab86d70..8cfd076 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -172,7 +172,7 @@
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
- self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC);
+ self = kzalloc(sizeof(*self), GFP_ATOMIC);
if (!self) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL;
@@ -181,7 +181,6 @@
/*
* Initialize instance
*/
- memset(self, 0, sizeof(struct iriap_cb));
self->magic = IAS_MAGIC;
self->mode = mode;