lkml.org 
[lkml]   [2005]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC][PATCH 5/6] PCI PM: kzalloc() cleanup
From
Date
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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-16 04:25    [W:0.037 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site