Add proper put_device() calls in all exit paths to fix the reference count imbalance.
How do you think about to apply the attribute “__free(put_device)” in this function implementation? https://elixir.bootlin.com/linux/v6.18-rc5/source/include/linux/device.h#L11...
Regards, Markus