aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/iriap.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-20 22:18:33 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:17 -0500
commitb3ab09f9e1681916df349d54232fbb3f8a79bfa5 (patch)
tree3eb5667ee2efd5ea0355f881cb02898cd5658192 /net/irda/iriap.c
parent8b2ed4bba45b7ca8e378d45f82f3f32f651e0a42 (diff)
[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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index ab86d70393ea..8cfd076c4c12 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,
172 172
173 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 173 IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
174 174
175 self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC); 175 self = kzalloc(sizeof(*self), GFP_ATOMIC);
176 if (!self) { 176 if (!self) {
177 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 177 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
178 return NULL; 178 return NULL;
@@ -181,7 +181,6 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
181 /* 181 /*
182 * Initialize instance 182 * Initialize instance
183 */ 183 */
184 memset(self, 0, sizeof(struct iriap_cb));
185 184
186 self->magic = IAS_MAGIC; 185 self->magic = IAS_MAGIC;
187 self->mode = mode; 186 self->mode = mode;