Commit 73f8ce7
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: aa74c44 ("pinctrl: Add driver for Sunplus SP7021")
Signed-off-by: Wells Lu <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[Rebased on the patch from Lu Hongfei]
Signed-off-by: Linus Walleij <[email protected]>1 parent b2132af commit 73f8ce7
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
975 | | - | |
| 974 | + | |
976 | 975 | | |
977 | 976 | | |
978 | 977 | | |
| |||
0 commit comments