Signed-off-by: Pingfan Liu <kernelf...@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Michael Ellerman <m...@ellerman.id.au>
Cc: Hari Bathini <hbath...@linux.ibm.com>
Cc: Aneesh Kumar K.V <aneesh.ku...@linux.ibm.com>
Cc: Oliver O'Halloran <ooh...@gmail.com>
Cc: Dan Williams <dan.j.willi...@intel.com>
Cc: ke...@lists.infradead.org
---
 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

Reply via email to