]> git.baikalelectronics.ru Git - kernel.git/commit
clk: pxa: add a check for the return value of kzalloc()
authorXiaoke Wang <xkernel.wang@foxmail.com>
Thu, 7 Apr 2022 09:33:49 +0000 (17:33 +0800)
committerStephen Boyd <sboyd@kernel.org>
Mon, 3 Oct 2022 19:32:03 +0000 (12:32 -0700)
commitce3aa2f78b4d795008d58fcbe899f081c20e73ff
tree098e919b4635fe3ec155a9d7e9efc55ae971c7b6
parenta586512b9963b4338e47a5ef031f0f0574986745
clk: pxa: add a check for 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 it to
prevent potential wrong memory access.

Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_2B9817738F38B02844C245946EFF3B407E09@qq.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/pxa/clk-pxa.c