aboutsummaryrefslogtreecommitdiffstats
path: root/net/econet/af_econet.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-07-21 17:51:30 -0400
committerDavid S. Miller <davem@davemloft.net>2006-07-21 17:51:30 -0400
commit0da974f4f303a6842516b764507e3c0a03f41e5a (patch)
tree8872aec792f02040269c6769dd1009b20f71d186 /net/econet/af_econet.c
parenta0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff)
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/econet/af_econet.c')
-rw-r--r--net/econet/af_econet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 309ae4c6549a..4d66aac13483 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -673,12 +673,11 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
673 edev = dev->ec_ptr; 673 edev = dev->ec_ptr;
674 if (edev == NULL) { 674 if (edev == NULL) {
675 /* Magic up a new one. */ 675 /* Magic up a new one. */
676 edev = kmalloc(sizeof(struct ec_device), GFP_KERNEL); 676 edev = kzalloc(sizeof(struct ec_device), GFP_KERNEL);
677 if (edev == NULL) { 677 if (edev == NULL) {
678 err = -ENOMEM; 678 err = -ENOMEM;
679 break; 679 break;
680 } 680 }
681 memset(edev, 0, sizeof(struct ec_device));
682 dev->ec_ptr = edev; 681 dev->ec_ptr = edev;
683 } else 682 } else
684 net2dev_map[edev->net] = NULL; 683 net2dev_map[edev->net] = NULL;