aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/of_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/of_platform.c')
-rw-r--r--arch/powerpc/kernel/of_platform.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 9536ed7f247c..8ded4e7dc87e 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -222,10 +222,9 @@ struct of_device* of_platform_device_create(struct device_node *np,
222{ 222{
223 struct of_device *dev; 223 struct of_device *dev;
224 224
225 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 225 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
226 if (!dev) 226 if (!dev)
227 return NULL; 227 return NULL;
228 memset(dev, 0, sizeof(*dev));
229 228
230 dev->node = of_node_get(np); 229 dev->node = of_node_get(np);
231 dev->dma_mask = 0xffffffffUL; 230 dev->dma_mask = 0xffffffffUL;