diff options
author | Wells Lu <wellslutw@gmail.com> | 2023-05-28 14:34:37 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-06-09 09:31:18 +0200 |
commit | 73f8ce7f961afcb3be49352efeb7c26cc1c00cc4 (patch) | |
tree | f915bd58a09e383c46d5605e60e45687b9c61072 /drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | |
parent | pinctrl: nxp: Fix resource leaks in for_each_child_of_node() loops (diff) | |
download | linux-73f8ce7f961afcb3be49352efeb7c26cc1c00cc4.tar.xz linux-73f8ce7f961afcb3be49352efeb7c26cc1c00cc4.zip |
pinctrl:sunplus: Add check for kmalloc
Fix Smatch static checker warning:
potential null dereference 'configs'. (kmalloc returns null)
Changes in v2:
1. Add free allocated memory before returned -ENOMEM.
2. Add call of_node_put() before returned -ENOMEM.
Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
Signed-off-by: Wells Lu <wellslutw@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/1685277277-12209-1-git-send-email-wellslutw@gmail.com
[Rebased on the patch from Lu Hongfei]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c')
0 files changed, 0 insertions, 0 deletions