* [PATCH] ath10k: remove redundant error check
@ 2017-02-28 11:14 Colin King
2017-03-16 8:57 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-02-28 11:14 UTC (permalink / raw)
To: Kalle Valo, ath10k, linux-wireless, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The check on ret for an error is redundant because it is already been
checked for non-zero earlier on and ret is never non-zero at this point.
Fix this by removing the redundant check and error message.
Detected by CoverityScan, CID#1357170 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 6094372..52896c2 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -970,12 +970,6 @@ static int ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data,
}
remaining_bytes -= nbytes;
-
- if (ret) {
- ath10k_warn(ar, "failed to read diag value at 0x%x: %d\n",
- address, ret);
- break;
- }
memcpy(data, data_buf, nbytes);
address += nbytes;
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ath10k: remove redundant error check
2017-02-28 11:14 [PATCH] ath10k: remove redundant error check Colin King
@ 2017-03-16 8:57 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-03-16 8:57 UTC (permalink / raw)
To: Colin Ian King
Cc: ath10k, linux-wireless, netdev, kernel-janitors, linux-kernel
Colin Ian King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The check on ret for an error is redundant because it is already been
> checked for non-zero earlier on and ret is never non-zero at this point.
> Fix this by removing the redundant check and error message.
>
> Detected by CoverityScan, CID#1357170 ("Logically Dead Code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Patch applied to ath-next branch of ath.git, thanks.
51f60b8b6979 ath10k: remove redundant error check
--
https://patchwork.kernel.org/patch/9595221/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-16 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 11:14 [PATCH] ath10k: remove redundant error check Colin King
2017-03-16 8:57 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).