Skip to content

Commit

Permalink
s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Martin Schwidefsky committed Dec 3, 2012
1 parent 916908d commit 4118fee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,9 @@ struct zpci_dev *zpci_alloc_device(void)
return ERR_PTR(-ENOMEM);

/* Alloc aibv & callback space */
zdev->irq_map = kmem_cache_alloc(zdev_irq_cache, GFP_KERNEL);
zdev->irq_map = kmem_cache_zalloc(zdev_irq_cache, GFP_KERNEL);
if (!zdev->irq_map)
goto error;
memset(zdev->irq_map, 0, sizeof(*zdev->irq_map));
WARN_ON((u64) zdev->irq_map & 0xff);
return zdev;

Expand Down

0 comments on commit 4118fee

Please sign in to comment.