diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 03:18:33 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 05:30:17 (GMT) |
commit | b3ab09f9e1681916df349d54232fbb3f8a79bfa5 (patch) | |
tree | 3eb5667ee2efd5ea0355f881cb02898cd5658192 /net/irda/iriap.c | |
parent | 8b2ed4bba45b7ca8e378d45f82f3f32f651e0a42 (diff) | |
download | linux-b3ab09f9e1681916df349d54232fbb3f8a79bfa5.tar.xz |
[IRDA]: Use kmemdup where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/irda/iriap.c')
-rw-r--r-- | net/irda/iriap.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, 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 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, /* * Initialize instance */ - memset(self, 0, sizeof(struct iriap_cb)); self->magic = IAS_MAGIC; self->mode = mode; |