s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 25 Feb 2013 14:09:25 +0000 (22:09 +0800)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 17 Apr 2013 12:07:24 +0000 (14:07 +0200)
Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci.c

index 27b4c17855b9dfdd60ac8fa480fe935428094914..fddf847e71aceb2609b6c25f224e657b92f6cb69 100644 (file)
@@ -249,10 +249,9 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev)
        if (zdev->fmb)
                return -EINVAL;
 
-       zdev->fmb = kmem_cache_alloc(zdev_fmb_cache, GFP_KERNEL);
+       zdev->fmb = kmem_cache_zalloc(zdev_fmb_cache, GFP_KERNEL);
        if (!zdev->fmb)
                return -ENOMEM;
-       memset(zdev->fmb, 0, sizeof(*zdev->fmb));
        WARN_ON((u64) zdev->fmb & 0xf);
 
        args.fmb_addr = virt_to_phys(zdev->fmb);