]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: sram: fix resource leaks in probe error path
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jul 2018 10:05:47 +0000 (12:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Aug 2018 05:44:55 +0000 (07:44 +0200)
commit16dd10970fee8724b1a199a21517a6349ff8a51d
treed32a3a1780915a856cb644420c228ff82eed242d
parent0e3207bd59ffeb895ca11d6043dc446fda922776
misc: sram: fix resource leaks in probe error path

commit f294d00961d1d869ecffa60e280eeeee1ccf9a49 upstream.

Make sure to disable clocks and deregister any exported partitions
before returning on late probe errors.

Note that since commit ee895ccdf776 ("misc: sram: fix enabled clock leak
on error path"), partitions are deliberately exported before enabling
the clock so we stick to that logic here. A follow up patch will address
this.

Cc: stable <stable@vger.kernel.org> # 4.9
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/sram.c