aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/prom_common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-12-16 12:26:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-12-16 12:26:26 -0800
commit64b3dcc35e8dcaa3032aa6aba416d05f41ead959 (patch)
treea9b16f5cef9ec006061b284fcf79645a7d89cbff /arch/sparc/kernel/prom_common.c
parent24545cf168d1128bd74dfe6ea9e864825e25dd02 (diff)
parentb1f44e13a525d2ffb7d5afe2273b7169d6f2222e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc32: Be less strict in matching %lo part of relocation. sbus: convert drivers/sbus/char/* to use module_platform_driver() bbc_i2c: Remove unneeded err variable sparc: Use kmemdup rather than duplicating its implementation
Diffstat (limited to 'arch/sparc/kernel/prom_common.c')
-rw-r--r--arch/sparc/kernel/prom_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
index 46614807a57..741df916c12 100644
--- a/arch/sparc/kernel/prom_common.c
+++ b/arch/sparc/kernel/prom_common.c
@@ -58,12 +58,10 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
void *new_val;
int err;
- new_val = kmalloc(len, GFP_KERNEL);
+ new_val = kmemdup(val, len, GFP_KERNEL);
if (!new_val)
return -ENOMEM;
- memcpy(new_val, val, len);
-
err = -ENODEV;
mutex_lock(&of_set_property_mutex);