Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589388 > unrolled thread

[PATCH] ath10k: remove redundant error check

Started byColin King <colin.king@canonical.com>
First post2017-02-28 13:00 +0100
Last post2017-02-28 13:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ath10k: remove redundant error check Colin King <colin.king@canonical.com> - 2017-02-28 13:00 +0100

#1589388 — [PATCH] ath10k: remove redundant error check

FromColin King <colin.king@canonical.com>
Date2017-02-28 13:00 +0100
Subject[PATCH] ath10k: remove redundant error check
Message-ID<tfOBI-3VC-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web