public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 5/6] PCI PM: kzalloc() cleanup
@ 2005-11-16  3:31 Adam Belay
  2005-11-16  6:22 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Belay @ 2005-11-16  3:31 UTC (permalink / raw)
  To: Linux-pm mailing list, Greg KH; +Cc: linux-kernel

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 */



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-16  7:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-16  3:31 [RFC][PATCH 5/6] PCI PM: kzalloc() cleanup Adam Belay
2005-11-16  6:22 ` Greg KH
2005-11-16  7:21   ` Adam Belay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox