clk: imx: Add check for kcalloc
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 10 Mar 2022 08:02:57 +0000 (16:02 +0800)
committerAbel Vesa <abel.vesa@nxp.com>
Tue, 12 Apr 2022 11:00:20 +0000 (14:00 +0300)
commited713e2bc093239ccd380c2ce8ae9e4162f5c037
tree1372ac82630ff712e13082db86bc975d72976c54
parentce0fc2f00fa26310cd29e462f816a5e660754d68
clk: imx: Add check for kcalloc

As the potential failure of the kcalloc(),
it should be better to check it in order to
avoid the dereference of the NULL pointer.

Fixes: 379c9a24cc23 ("clk: imx: Fix reparenting of UARTs not associated with stdout")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20220310080257.1988412-1-jiasheng@iscas.ac.cn
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
drivers/clk/imx/clk.c