> driver_find_device() calls get_device() to increment the reference > count once a matching device is found, but there is no put_device() to > balance the reference count. To avoid reference count leakage, add > put_device() to decrease the reference count.
How do you think about to increase the application of scope-based resource management? https://elixir.bootlin.com/linux/v6.17-rc7/source/include/linux/device.h#L1180 Regards, Markus
