Skip to content

Commit 30d0850

Browse files
Dan CarpenterKalle Valo
authored andcommitted
ath11k: Fix ath11k_pci_fix_l1ss()
All these conditions are reversed so presumably most of the function is dead code. This caused a spurious warning: [ 95.734922] ath11k_pci 0000:06:00.0: failed to set sysclk: 0 Fixes: 0699940 ("ath11k: pci: fix L1ss clock unstable problem") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/X9nGDHiTh+Z+asDy@mwanda
1 parent 9b09456 commit 30d0850

File tree

1 file changed

+4
-4
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+4
-4
lines changed

drivers/net/wireless/ath/ath11k/pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab)
274274
PCIE_QSERDES_COM_SYSCLK_EN_SEL_REG,
275275
PCIE_QSERDES_COM_SYSCLK_EN_SEL_VAL,
276276
PCIE_QSERDES_COM_SYSCLK_EN_SEL_MSK);
277-
if (!ret) {
277+
if (ret) {
278278
ath11k_warn(ab, "failed to set sysclk: %d\n", ret);
279279
return ret;
280280
}
@@ -283,7 +283,7 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab)
283283
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_REG,
284284
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG1_VAL,
285285
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK);
286-
if (!ret) {
286+
if (ret) {
287287
ath11k_warn(ab, "failed to set dtct config1 error: %d\n", ret);
288288
return ret;
289289
}
@@ -292,7 +292,7 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab)
292292
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_REG,
293293
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG2_VAL,
294294
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK);
295-
if (!ret) {
295+
if (ret) {
296296
ath11k_warn(ab, "failed to set dtct config2: %d\n", ret);
297297
return ret;
298298
}
@@ -301,7 +301,7 @@ static int ath11k_pci_fix_l1ss(struct ath11k_base *ab)
301301
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_REG,
302302
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG4_VAL,
303303
PCIE_USB3_PCS_MISC_OSC_DTCT_CONFIG_MSK);
304-
if (!ret) {
304+
if (ret) {
305305
ath11k_warn(ab, "failed to set dtct config4: %d\n", ret);
306306
return ret;
307307
}

0 commit comments

Comments
 (0)