aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-12-03 10:11:34 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-12-03 10:44:07 -0500
commit4118fee78dabb138b548bd42694f3437a8830b60 (patch)
tree90b04238690d9a4770db0a3e815ef982ef10633a /arch/s390/pci
parent916908df244fe53cc81d560ebaa9e2d11f1cee43 (diff)
s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 0723b1077a64..b0cef4db2413 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -602,10 +602,9 @@ struct zpci_dev *zpci_alloc_device(void)
602 return ERR_PTR(-ENOMEM); 602 return ERR_PTR(-ENOMEM);
603 603
604 /* Alloc aibv & callback space */ 604 /* Alloc aibv & callback space */
605 zdev->irq_map = kmem_cache_alloc(zdev_irq_cache, GFP_KERNEL); 605 zdev->irq_map = kmem_cache_zalloc(zdev_irq_cache, GFP_KERNEL);
606 if (!zdev->irq_map) 606 if (!zdev->irq_map)
607 goto error; 607 goto error;
608 memset(zdev->irq_map, 0, sizeof(*zdev->irq_map));
609 WARN_ON((u64) zdev->irq_map & 0xff); 608 WARN_ON((u64) zdev->irq_map & 0xff);
610 return zdev; 609 return zdev;
611 610