Skip to content
Commit e2e6a217 authored by Hui Tang's avatar Hui Tang Committed by Claudiu Beznea
Browse files

clk: microchip: check for null return of devm_kzalloc()



Because of the possible failure of devm_kzalloc(), name might be NULL and
will cause null pointer dereference later.

Therefore, it might be better to check it and directly return -ENOMEM.

Fixes: d39fb172 ("clk: microchip: add PolarFire SoC fabric clock support")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
[claudiu.beznea: s/refrence/reference/, s/possilble/possible]
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221119054858.178629-1-tanghui20@huawei.com
parent 57976762
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment