From: Pingfan Liu <kernelfans@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: kexec@lists.infradead.org, Pingfan Liu <kernelfans@gmail.com>,
Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Oliver O'Halloran <oohall@gmail.com>,
Dan Williams <dan.j.williams@intel.com>,
Hari Bathini <hbathini@linux.ibm.com>
Subject: [PATCH 2/3] powerpc/of: coding style cleanup
Date: Fri, 28 Feb 2020 13:53:11 +0800 [thread overview]
Message-ID: <1582869192-9284-2-git-send-email-kernelfans@gmail.com> (raw)
In-Reply-To: <1582869192-9284-1-git-send-email-kernelfans@gmail.com>
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Oliver O'Halloran <oohall@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: kexec@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
next prev parent reply other threads:[~2020-02-28 5:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 5:53 [PATCH 1/3] powerpc/of: split out new_property() for reusing Pingfan Liu
2020-02-28 5:53 ` Pingfan Liu [this message]
2020-02-28 5:53 ` [PATCH 3/3] pseries/scm: buffer pmem's bound addr in dt for kexec kernel Pingfan Liu
2020-02-28 6:52 ` Christophe Leroy
2020-02-28 9:27 ` Pingfan Liu
2020-02-28 6:03 ` [PATCH 1/3] powerpc/of: split out new_property() for reusing Andrew Donnellan
2020-02-28 6:22 ` Pingfan Liu
2020-02-28 6:47 ` Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1582869192-9284-2-git-send-email-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=hbathini@linux.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).