Commit 0d6d7a39 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Alexandre Belloni
Browse files

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: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201110094205.8972-1-brgl@bgdev.pl
parent 1bfc485b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}