diff options
-rw-r--r-- | arch/arm64/kernel/armv8_deprecated.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index 2ec09debc2bb..ca158be21f83 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c | |||
@@ -174,6 +174,9 @@ static void __init register_insn_emulation(struct insn_emulation_ops *ops) | |||
174 | struct insn_emulation *insn; | 174 | struct insn_emulation *insn; |
175 | 175 | ||
176 | insn = kzalloc(sizeof(*insn), GFP_KERNEL); | 176 | insn = kzalloc(sizeof(*insn), GFP_KERNEL); |
177 | if (!insn) | ||
178 | return; | ||
179 | |||
177 | insn->ops = ops; | 180 | insn->ops = ops; |
178 | insn->min = INSN_UNDEF; | 181 | insn->min = INSN_UNDEF; |
179 | 182 | ||
@@ -233,6 +236,8 @@ static void __init register_insn_emulation_sysctl(void) | |||
233 | 236 | ||
234 | insns_sysctl = kcalloc(nr_insn_emulated + 1, sizeof(*sysctl), | 237 | insns_sysctl = kcalloc(nr_insn_emulated + 1, sizeof(*sysctl), |
235 | GFP_KERNEL); | 238 | GFP_KERNEL); |
239 | if (!insns_sysctl) | ||
240 | return; | ||
236 | 241 | ||
237 | raw_spin_lock_irqsave(&insn_emulation_lock, flags); | 242 | raw_spin_lock_irqsave(&insn_emulation_lock, flags); |
238 | list_for_each_entry(insn, &insn_emulation, node) { | 243 | list_for_each_entry(insn, &insn_emulation, node) { |