]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: cadence: fix clock imbalance on probe failure
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 12:36:13 +0000 (14:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:29 +0000 (17:16 +0200)
commitc5f87fccd3fbf2191e4fa10d8403d5edc17cb916
treea7c375c3c4804fdcfa99799daf036208ba3b81f8
parent02bcd5b06c7c8b971091084be55fe950e28283ab
spi: cadence: fix clock imbalance on probe failure

commit ecea4f0e9db2fb6ab4a68a59c5aba0d8f59a9566 upstream.

Make sure that the controller is active before disabling clocks on probe
failure to avoid unbalanced clock disable.

Also drop the usage count before returning (so that the controller can
be suspended after a probe deferral) and restore the autosuspend
setting.

Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Cc: stable@vger.kernel.org # 4.7
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-cadence.c