Commit 9b094562 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo

ath11k: Fix error code in ath11k_core_suspend()

The "if (!ret)" condition is inverted and it should be "if (ret)".  It means
that we return success when we had intended to return an error code. This also
caused a spurious warning even when the suspend was successful:

[  297.186612] ath11k_pci 0000:06:00.0: failed to suspend hif: 0

Fixes: d1b0c338 ("ath11k: implement suspend for QCA6390 PCI devices")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/X9nF17L2/EKOSbn/@mwanda
parent aa44b2f3
...@@ -185,7 +185,7 @@ int ath11k_core_suspend(struct ath11k_base *ab) ...@@ -185,7 +185,7 @@ int ath11k_core_suspend(struct ath11k_base *ab)
ath11k_hif_ce_irq_disable(ab); ath11k_hif_ce_irq_disable(ab);
ret = ath11k_hif_suspend(ab); ret = ath11k_hif_suspend(ab);
if (!ret) { if (ret) {
ath11k_warn(ab, "failed to suspend hif: %d\n", ret); ath11k_warn(ab, "failed to suspend hif: %d\n", ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment