diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-24 06:15:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:18 -0500 |
commit | 88abaab4f9b08381e30e737980a1c49d6b524dfc (patch) | |
tree | d33aa82674c00c37cd293c9e888cff785880ce5a /drivers/s390/net/netiucv.c | |
parent | fb630517f0d0736ea73af07d6b357be9ad67e6f1 (diff) |
[PATCH] s390: kzalloc() conversion in drivers/s390
Convert all kmalloc + memset sequences in drivers/s390 to kzalloc usage.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/net/netiucv.c')
-rw-r--r-- | drivers/s390/net/netiucv.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 71d3853e8682..260a93c8c442 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1728,14 +1728,13 @@ static int | |||
1728 | netiucv_register_device(struct net_device *ndev) | 1728 | netiucv_register_device(struct net_device *ndev) |
1729 | { | 1729 | { |
1730 | struct netiucv_priv *priv = ndev->priv; | 1730 | struct netiucv_priv *priv = ndev->priv; |
1731 | struct device *dev = kmalloc(sizeof(struct device), GFP_KERNEL); | 1731 | struct device *dev = kzalloc(sizeof(struct device), GFP_KERNEL); |
1732 | int ret; | 1732 | int ret; |
1733 | 1733 | ||
1734 | 1734 | ||
1735 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1735 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); |
1736 | 1736 | ||
1737 | if (dev) { | 1737 | if (dev) { |
1738 | memset(dev, 0, sizeof(struct device)); | ||
1739 | snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); | 1738 | snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); |
1740 | dev->bus = &iucv_bus; | 1739 | dev->bus = &iucv_bus; |
1741 | dev->parent = iucv_root; | 1740 | dev->parent = iucv_root; |
@@ -1784,11 +1783,9 @@ netiucv_new_connection(struct net_device *dev, char *username) | |||
1784 | { | 1783 | { |
1785 | struct iucv_connection **clist = &iucv_connections; | 1784 | struct iucv_connection **clist = &iucv_connections; |
1786 | struct iucv_connection *conn = | 1785 | struct iucv_connection *conn = |
1787 | (struct iucv_connection *) | 1786 | kzalloc(sizeof(struct iucv_connection), GFP_KERNEL); |
1788 | kmalloc(sizeof(struct iucv_connection), GFP_KERNEL); | ||
1789 | 1787 | ||
1790 | if (conn) { | 1788 | if (conn) { |
1791 | memset(conn, 0, sizeof(struct iucv_connection)); | ||
1792 | skb_queue_head_init(&conn->collect_queue); | 1789 | skb_queue_head_init(&conn->collect_queue); |
1793 | skb_queue_head_init(&conn->commit_queue); | 1790 | skb_queue_head_init(&conn->commit_queue); |
1794 | conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; | 1791 | conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; |