These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / powerpc / platforms / pseries / hotplug-memory.c
index 0ced387..e9ff44c 100644 (file)
@@ -92,13 +92,12 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn)
                return NULL;
 
        new_prop->name = kstrdup(prop->name, GFP_KERNEL);
-       new_prop->value = kmalloc(prop->length, GFP_KERNEL);
+       new_prop->value = kmemdup(prop->value, prop->length, GFP_KERNEL);
        if (!new_prop->name || !new_prop->value) {
                dlpar_free_drconf_property(new_prop);
                return NULL;
        }
 
-       memcpy(new_prop->value, prop->value, prop->length);
        new_prop->length = prop->length;
 
        /* Convert the property to cpu endian-ness */