Commit abba116
spi: spi-s3c64xx.c: Remove of_node_put for auto cleanup
Use the scope based of_node_put() cleanup in s3c64xx_spi_csinfo to
automatically release the device node with the __free() cleanup handler
Initialize data_np at the point of declaration for clarity of scope.
This change reduces the risk of memory leaks and simplifies the code by
removing manual node put call.
Suggested-by: Julia Lawall <[email protected]>
Signed-off-by: Shivani Gupta <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent 856d9e8 commit abba116
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
| 953 | + | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| |||
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
966 | | - | |
| 966 | + | |
| 967 | + | |
967 | 968 | | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
973 | 974 | | |
974 | | - | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
0 commit comments