]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: lantiq: check the return value of kzalloc()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Fri, 25 Mar 2022 11:49:41 +0000 (19:49 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 30 Mar 2022 18:25:48 +0000 (20:25 +0200)
commit5211fda2da32b59df1b4498bad053e56d9a8272f
treebbf316f4fad2183dd5c020dbadef27668b653640
parent958e3f5e7164716787dd9081c8408e741e87b2c3
MIPS: lantiq: check the return value of kzalloc()

kzalloc() is a memory allocation function which can return NULL when
some internal memory errors happen. So it is better to check the
return value of it to prevent potential wrong memory access or
memory leak.

Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/lantiq/falcon/sysctrl.c
arch/mips/lantiq/xway/gptu.c
arch/mips/lantiq/xway/sysctrl.c