mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
916908df24
commit
4118fee78d
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue