Skip to content
Unverified Commit abba116f authored by Shivani Gupta's avatar Shivani Gupta Committed by Mark Brown
Browse files

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: default avatarJulia Lawall <julia.lawall@inria.fr>
Signed-off-by: default avatarShivani Gupta <shivani07g@gmail.com>
Link: https://lore.kernel.org/r/20240418000505.731724-1-shivani07g@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 856d9e8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment