Re: [PATCH] rtc: fix RTC removal

2020-12-07 Thread Bartosz Golaszewski
On Sun, Dec 6, 2020 at 12:14 AM Alexandre Belloni wrote: > > Since the rtc_register_device, removing an RTC device will end with a > refcount_t: underflow; use-after-free warning since put_device is called > twice in the device tear down path. > > Fixes: fdcfd854333b ("rtc: rework

[PATCH] rtc: fix RTC removal

2020-12-05 Thread Alexandre Belloni
Since the rtc_register_device, removing an RTC device will end with a refcount_t: underflow; use-after-free warning since put_device is called twice in the device tear down path. Fixes: fdcfd854333b ("rtc: rework rtc_register_device() resource management") Signed-off-by: Alexandre Belloni ---