projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bfc485
)
rtc: destroy mutex when releasing the device
author
Bartosz Golaszewski
<bgolaszewski@baylibre.com>
Tue, 10 Nov 2020 09:42:05 +0000
(10:42 +0100)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Thu, 19 Nov 2020 11:50:12 +0000
(12:50 +0100)
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 <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link:
https://lore.kernel.org/r/20201110094205.8972-1-brgl@bgdev.pl
drivers/rtc/class.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/class.c
b/drivers/rtc/class.c
index a1b3711aaf0171234f0a46855e27d985ff193036..e6b44b7c4ad3ac3fa43eb73ca5aedfa3663a2233 100644
(file)
--- 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);
}