]> git.baikalelectronics.ru Git - kernel.git/commit
mips: sgi-ip22: add a check for the return of kzalloc()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Fri, 25 Mar 2022 10:57:18 +0000 (18:57 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 30 Mar 2022 18:25:11 +0000 (20:25 +0200)
commit9d26397e1c6dd803a7f3d8a89cfbf23e159a1f85
treed62b7f7a926eddeba411642879e554cf99f7e2ea
parentc5e39ffe56adb03bfeb5ab0bb1a2b17a8c1ad985
mips: sgi-ip22: add a check for the return of kzalloc()

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

Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/sgi-ip22/ip22-gio.c