diff options
Diffstat (limited to 'arch/sparc/kernel/of_device.c')
-rw-r--r-- | arch/sparc/kernel/of_device.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 46200c43ffb1..dab6169e31ca 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -793,10 +793,9 @@ struct of_device* of_platform_device_create(struct device_node *np, | |||
793 | { | 793 | { |
794 | struct of_device *dev; | 794 | struct of_device *dev; |
795 | 795 | ||
796 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 796 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
797 | if (!dev) | 797 | if (!dev) |
798 | return NULL; | 798 | return NULL; |
799 | memset(dev, 0, sizeof(*dev)); | ||
800 | 799 | ||
801 | dev->dev.parent = parent; | 800 | dev->dev.parent = parent; |
802 | dev->dev.bus = bus; | 801 | dev->dev.bus = bus; |