Signed-off-by: Pingfan Liu <kernelfans@xxxxxxxxx> To: linuxppc-dev@xxxxxxxxxxxxxxxx Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Hari Bathini <hbathini@xxxxxxxxxxxxx> Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx> Cc: Oliver O'Halloran <oohall@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: kexec@xxxxxxxxxxxxxxxxxxx --- arch/powerpc/kernel/of_property.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/of_property.c b/arch/powerpc/kernel/of_property.c index e56c832..c6abf7e 100644 --- a/arch/powerpc/kernel/of_property.c +++ b/arch/powerpc/kernel/of_property.c @@ -5,16 +5,18 @@ #include <linux/slab.h> struct property *new_property(const char *name, const int length, - const unsigned char *value, struct property *last) + const unsigned char *value, struct property *last) { struct property *new = kzalloc(sizeof(*new), GFP_KERNEL); if (!new) return NULL; - if (!(new->name = kstrdup(name, GFP_KERNEL))) + new->name = kstrdup(name, GFP_KERNEL); + if (!new->name) goto cleanup; - if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) + new->value = kmalloc(length + 1, GFP_KERNEL); + if (!new->value) goto cleanup; memcpy(new->value, value, length); -- 2.7.5 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec