PM / sleep: fix device reference leak in test_suspend
authorJohan Hovold <johan@kernel.org>
Tue, 1 Nov 2016 10:49:56 +0000 (11:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:04:00 +0000 (11:04 +0100)
commit6d97f02a6c0faa8cef0bae45cc2f16fbaf38332a
tree1c64d1cd6cd6134c933dc2996c2567f4ea293546
parent26b5a4a56fd60530d0ab3b51a7fda5841d4f9316
PM / sleep: fix device reference leak in test_suspend

commit ceb75787bc75d0a7b88519ab8a68067ac690f55a upstream.

Make sure to drop the reference taken by class_find_device() after
opening the RTC device.

Fixes: 77437fd4e61f (pm: boot time suspend selftest)
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
kernel/power/suspend_test.c