* [PATCH v2 02/35] powerpc: Add an allocation failure check
@ 2019-07-03 16:26 Fuqian Huang
0 siblings, 0 replies; only message in thread
From: Fuqian Huang @ 2019-07-03 16:26 UTC (permalink / raw)
Cc: linux-kernel, Paul Mackerras, Fuqian Huang, linuxppc-dev
Add an allocation failure check.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
Changes in v2:
- Split into two patches
arch/powerpc/platforms/pseries/dlpar.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 437a74173db2..7488e40f5e47 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -385,6 +385,8 @@ void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog)
hp_errlog_copy = kmalloc(sizeof(struct pseries_hp_errorlog),
GFP_KERNEL);
+ if (!hp_errlog_copy)
+ return;
memcpy(hp_errlog_copy, hp_errlog, sizeof(struct pseries_hp_errorlog));
work = kmalloc(sizeof(struct pseries_hp_work), GFP_KERNEL);
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-03 16:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03 16:26 [PATCH v2 02/35] powerpc: Add an allocation failure check Fuqian Huang
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).