]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: sunplus: Add check for kcalloc
authorWilliam Dean <williamsukatube@gmail.com>
Sun, 10 Jul 2022 15:48:22 +0000 (23:48 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 11 Jul 2022 13:04:19 +0000 (15:04 +0200)
commit1f789b2af8afd50dd465fa1c8769c8dfd6ae8264
tree22eac9b15e92f93221215acdd4f073845c5ec867
parentdc3d521def94d25314a9bdfe7dd81e7ad874ec22
pinctrl: sunplus: 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: 81ccb35980cbf ("pinctrl: Add driver for Sunplus SP7021")
Reported-by: Hacash Robot <hacashRobot@santino.com>
Signed-off-by: William Dean <williamsukatube@gmail.com>
Link: https://lore.kernel.org/r/20220710154822.2610801-1-williamsukatube@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunplus/sppctl.c