diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-02-12 09:55:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 18:48:43 +0100 |
commit | f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0 (patch) | |
tree | f4ff35f5991debf0f892794687abc574cdaacb4f /drivers/video/nvidia/nvidia.c | |
parent | [PATCH] Video: fb, add true ref_count atomicity (diff) | |
download | linux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.tar.xz linux-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.zip |
[PATCH] Video: fb, kzalloc changes
Use kzalloc instead of kmalloc + memset(0).
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 538e947610e1..f6731dadff3a 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -1205,13 +1205,11 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd, par = info->par; par->pci_dev = pd; - info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL); + info->pixmap.addr = kzalloc(8 * 1024, GFP_KERNEL); if (info->pixmap.addr == NULL) goto err_out_kfree; - memset(info->pixmap.addr, 0, 8 * 1024); - if (pci_enable_device(pd)) { printk(KERN_ERR PFX "cannot enable PCI device\n"); goto err_out_enable; |