]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:25:49 +0000 (08:25 +0900)
commitecea4f0e9db2fb6ab4a68a59c5aba0d8f59a9566
treec3d1098db7f40355d8ce1c341d2a0c69172834bf
parent5b1689a41f02955c5361944f748a4812a6ff9307
spi: cadence: fix clock imbalance on probe failure

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>
drivers/spi/spi-cadence.c