From: Qiujun Huang <hqjagain@gmail.com>
To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
oohall@gmail.com
Cc: linux-kernel@vger.kernel.org, Markus.Elfring@web.de,
tglx@linutronix.de, linuxppc-dev@lists.ozlabs.org,
Qiujun Huang <hqjagain@gmail.com>
Subject: [PATCH v5 0/2] Fix opal_add_one_export
Date: Mon, 6 Apr 2020 20:52:40 +0800 [thread overview]
Message-ID: <20200406125242.4973-1-hqjagain@gmail.com> (raw)
We should check the return value of kzalloc, as kzalloc may fail returning NULL.
---
v4->v5:
Separate the patch into two.
v3->v4:
Added the information about coccinelle script.
Added change log.
Added Oliver's Reviewed-by.
v2->v3:
Removed redundant assignment to 'attr' and 'name'.
v1->v2:
Just return -ENOMEM if attr is NULL.
Qiujun Huang (2):
powerpc/powernv: Remove redundant assignments to attr and name
powerpc/powernv: Add NULL check after kzalloc in opal_add_one_export
arch/powerpc/platforms/powernv/opal.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--
2.17.1
next reply other threads:[~2020-04-06 12:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 12:52 Qiujun Huang [this message]
2020-04-06 12:52 ` [PATCH v5 1/2] powerpc/powernv: Remove redundant assignments to attr and name Qiujun Huang
2020-04-06 13:40 ` [PATCH v5 1/2] powerpc/powernv: Remove two unnecessary variable initialisations in opal_add_one_export() Markus Elfring
2020-04-06 14:56 ` [PATCH v5 1/2] powerpc/powernv: Return directly after a failed of_property_read_u64_array() " Markus Elfring
2020-04-06 12:52 ` [PATCH v5 2/2] powerpc/powernv: Add NULL check after kzalloc in opal_add_one_export Qiujun Huang
2020-04-06 14:00 ` Markus Elfring
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=20200406125242.4973-1-hqjagain@gmail.com \
--to=hqjagain@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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).