[PATCH 2/3] powerpc/of: coding style cleanup
Pingfan Liu
kernelfans at gmail.com
Fri Feb 28 16:53:11 AEDT 2020
Signed-off-by: Pingfan Liu <kernelfans at gmail.com>
To: linuxppc-dev at lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Paul Mackerras <paulus at samba.org>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Hari Bathini <hbathini at linux.ibm.com>
Cc: Aneesh Kumar K.V <aneesh.kumar at linux.ibm.com>
Cc: Oliver O'Halloran <oohall at gmail.com>
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: kexec at 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
More information about the Linuxppc-dev
mailing list