diff options
| author | Bartosz Golaszewski <[email protected]> | 2020-11-10 09:42:05 +0000 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2020-11-19 11:50:12 +0000 |
| commit | 0d6d7a390b32ef23d957960d3bb8586a49d6af7c (patch) | |
| tree | c22e45458b1976b93a90de573fcec5e759e9e9d4 /drivers/rtc/class.c | |
| parent | rtc: shrink devm_rtc_allocate_device() (diff) | |
| download | kernel-0d6d7a390b32ef23d957960d3bb8586a49d6af7c.tar.gz kernel-0d6d7a390b32ef23d957960d3bb8586a49d6af7c.zip | |
rtc: destroy mutex when releasing the device
Not destroying mutexes doesn't lead to resource leak but it's the correct
thing to do for mutex debugging accounting.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/rtc/class.c')
| -rw-r--r-- | drivers/rtc/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index a1b3711aaf01..e6b44b7c4ad3 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -28,6 +28,7 @@ static void rtc_device_release(struct device *dev) struct rtc_device *rtc = to_rtc_device(dev); ida_simple_remove(&rtc_ida, rtc->id); + mutex_destroy(&rtc->ops_lock); kfree(rtc); } |
