Signed-off-by: Pingfan Liu <[email protected]>
To: [email protected]
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Hari Bathini <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Oliver O'Halloran <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: [email protected]
---
 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