[linux-pm] [RFC][PATCH 5/6] PCI PM: kzalloc() cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use kzalloc() instead of kmalloc() and memset().


--- a/drivers/pci/pm.c	2005-11-08 17:10:37.000000000 -0500
+++ b/drivers/pci/pm.c	2005-11-08 17:11:33.000000000 -0500
@@ -300,12 +300,10 @@
 		return -EIO;
 	}
 
-	dev->pm = pm_data = kmalloc(sizeof(struct pci_dev_pm), GFP_KERNEL);
+	dev->pm = pm_data = kzalloc(sizeof(struct pci_dev_pm), GFP_KERNEL);
 	if (!pm_data)
 		return -ENOMEM;
 
-	memset(pm_data, 0, sizeof(struct pci_dev_pm));
-
 	pm_data->pm_offset = pm;
 
 	/* determine supported device states */



[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux