diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index c492cee90e0f..6444eaa30a2f 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -248,7 +248,7 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
248 | } else { | 248 | } else { |
249 | int splpar_strlen; | 249 | int splpar_strlen; |
250 | int idx, w_idx; | 250 | int idx, w_idx; |
251 | char *workbuffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); | 251 | char *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); |
252 | if (!workbuffer) { | 252 | if (!workbuffer) { |
253 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", | 253 | printk(KERN_ERR "%s %s kmalloc failure at line %d \n", |
254 | __FILE__, __FUNCTION__, __LINE__); | 254 | __FILE__, __FUNCTION__, __LINE__); |
@@ -261,7 +261,6 @@ static void parse_system_parameter_string(struct seq_file *m) | |||
261 | splpar_strlen = local_buffer[0] * 256 + local_buffer[1]; | 261 | splpar_strlen = local_buffer[0] * 256 + local_buffer[1]; |
262 | local_buffer += 2; /* step over strlen value */ | 262 | local_buffer += 2; /* step over strlen value */ |
263 | 263 | ||
264 | memset(workbuffer, 0, SPLPAR_MAXLENGTH); | ||
265 | w_idx = 0; | 264 | w_idx = 0; |
266 | idx = 0; | 265 | idx = 0; |
267 | while ((*local_buffer) && (idx < splpar_strlen)) { | 266 | while ((*local_buffer) && (idx < splpar_strlen)) { |
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; |