]> www.infradead.org Git - users/dwmw2/linux.git/commit
misc: sram: enable clock before registering regions
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jul 2018 10:05:48 +0000 (12:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:04 +0000 (16:59 -0700)
commit741b2c3b62cf8033587b24d0c44231054dbc1e4e
treef9ada84df2c63ee0700f26245b6d5cdbb363e5de
parent919618d2323473a43865384fecfd5113cc62b0dc
misc: sram: enable clock before registering regions

[ Upstream commit d5b9653dd2bb7a2b1c8cc783c5d3b607bbb6b271 ]

Make sure to enable the clock before registering regions and exporting
partitions to user space at which point we must be prepared for I/O.

Fixes: ee895ccdf776 ("misc: sram: fix enabled clock leak on error path")
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/sram.c