summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@wdc.com>2025-01-28 09:12:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:01:39 +0100
commit7d46869aa7bd0a16d17e93a34dbb58089f23731b (patch)
tree369f5e9a81de4ae9cfea0ea04b4c8417687e83f5 /rust
parentf453c4515208aba5265171e760642608ffebec36 (diff)
downloadlinux-7d46869aa7bd0a16d17e93a34dbb58089f23731b.tar.gz
linux-7d46869aa7bd0a16d17e93a34dbb58089f23731b.tar.bz2
linux-7d46869aa7bd0a16d17e93a34dbb58089f23731b.zip
scsi: ufs: Fix toggling of clk_gating.state when clock gating is not allowed
[ Upstream commit 839a74b5649c9f41d939a05059b5ca6b17156d03 ] This commit addresses an issue where clk_gating.state is being toggled in ufshcd_setup_clocks() even if clock gating is not allowed. The fix is to add a check for hba->clk_gating.is_initialized before toggling clk_gating.state in ufshcd_setup_clocks(). Since clk_gating.lock is now initialized unconditionally, it can no longer lead to the spinlock being used before it is properly initialized, but instead it is mostly for documentation purposes. Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Avri Altman <avri.altman@wdc.com> Link: https://lore.kernel.org/r/20250128071207.75494-3-avri.altman@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions