diff options
author | Burman Yan <yan_952@hotmail.com> | 2007-02-14 11:33:07 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-14 19:09:52 +0300 |
commit | 8f31bb39ec2a5622974666c72257e74c22492602 (patch) | |
tree | 48f38c994f02c8699fe2a69599e8cc1bc8d36ea8 /drivers/serial/8250_pci.c | |
parent | 3689a0ec60bc8f56cc372c1dfa0d89dab48f7c9c (diff) | |
download | linux-8f31bb39ec2a5622974666c72257e74c22492602.tar.xz |
[PATCH] serial: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/8250_pci.c')
-rw-r--r-- | drivers/serial/8250_pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index a2dac378bda9..2989228ed701 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -1628,7 +1628,7 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) nr_ports = rc; } - priv = kmalloc(sizeof(struct serial_private) + + priv = kzalloc(sizeof(struct serial_private) + sizeof(unsigned int) * nr_ports, GFP_KERNEL); if (!priv) { @@ -1636,9 +1636,6 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) goto err_deinit; } - memset(priv, 0, sizeof(struct serial_private) + - sizeof(unsigned int) * nr_ports); - priv->dev = dev; priv->quirk = quirk; |