OpenCloudOS-Kernel/drivers/pinctrl/ralink
William Dean c3b821e8e4 pinctrl: ralink: Check for null return of devm_kcalloc
Because of the possible failure of the allocation, data->domains might
be NULL pointer and will cause the dereference of the NULL pointer
later.
Therefore, it might be better to check it and directly return -ENOMEM
without releasing data manually if fails, because the comment of the
devm_kmalloc() says "Memory allocated with this function is
automatically freed on driver detach.".

Fixes: a86854d0c5 ("treewide: devm_kzalloc() -> devm_kcalloc()")
Reported-by: Hacash Robot <hacashRobot@santino.com>
Signed-off-by: William Dean <williamsukatube@gmail.com>
Link: https://lore.kernel.org/r/20220710154922.2610876-1-williamsukatube@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2022-07-11 14:40:17 +02:00
..
Kconfig pinctrl: ralink: rename driver names to subdrivers 2022-04-23 00:05:42 +02:00
Makefile pinctrl: ralink: rename pinctrl-rt288x to pinctrl-rt2880 2022-04-23 00:05:41 +02:00
pinctrl-mt7620.c pinctrl: ralink: add new compatible strings for each pinctrl subdriver 2022-04-23 00:05:42 +02:00
pinctrl-mt7621.c pinctrl: ralink: add new compatible strings for each pinctrl subdriver 2022-04-23 00:05:42 +02:00
pinctrl-ralink.c pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-11 14:40:17 +02:00
pinctrl-ralink.h pinctrl: ralink: rename pinmux functions to pinctrl 2022-04-23 00:05:41 +02:00
pinctrl-rt305x.c pinctrl: ralink: add new compatible strings for each pinctrl subdriver 2022-04-23 00:05:42 +02:00
pinctrl-rt2880.c pinctrl: ralink: add new compatible strings for each pinctrl subdriver 2022-04-23 00:05:42 +02:00
pinctrl-rt3883.c pinctrl: ralink: add new compatible strings for each pinctrl subdriver 2022-04-23 00:05:42 +02:00