-
Kousik Sanagavarapu authored
Use scope based cleanup, instead of manual of_node_put() calls, which automatically free()s "struct device_node". While at it, refactor the code from knav_queue_probe() into the separate functions to make auto cleanup look more neat. Doing the cleanup this way has the advantage of reducing the chance of memory leaks in case we need to read from new OF nodes in the future when we probe. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> Link: https://lore.kernel.org/r/20240825085714.10736-4-five231003@gmail.comSigned-off-by: Nishanth Menon <nm@ti.com>
b0289dbf