diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-10-10 18:04:16 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-09 12:07:23 +0300 |
commit | ef34add89ee4d1473bd0e78f551efa6fc1feb0cd (patch) | |
tree | acf57061d08804de6c8f901e78ee94cdde70ede9 /drivers/thunderbolt/tb.c | |
parent | 4e7b4955cba13bb8b8f63400fbd28081f11179a7 (diff) | |
download | linux-ef34add89ee4d1473bd0e78f551efa6fc1feb0cd.tar.xz |
thunderbolt: Check valid TMU configuration in tb_switch_tmu_configure()
Instead of at enable time we can do this already in
tb_switch_tmu_configure().
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r-- | drivers/thunderbolt/tb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 41c353f462e7..91459bf2fd0f 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -282,9 +282,11 @@ static int tb_enable_tmu(struct tb_switch *sw) * highest accuracy. */ if (tb_switch_is_clx_enabled(sw, TB_CL1)) - tb_switch_tmu_configure(sw, TB_SWITCH_TMU_RATE_NORMAL, true); + ret = tb_switch_tmu_configure(sw, TB_SWITCH_TMU_RATE_NORMAL, true); else - tb_switch_tmu_configure(sw, TB_SWITCH_TMU_RATE_HIFI, false); + ret = tb_switch_tmu_configure(sw, TB_SWITCH_TMU_RATE_HIFI, false); + if (ret) + return ret; /* If it is already enabled in correct mode, don't touch it */ if (tb_switch_tmu_is_enabled(sw)) |