ath10k: remove redundant error check
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Feb 2017 11:14:39 +0000 (11:14 +0000)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 16 Mar 2017 08:56:46 +0000 (10:56 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c

index 6094372307aae46b296cd1cff40498a06427d8a3..52896c20ca4e5dff2ce96f6f8435cbe39c328caf 100644 (file)
@@ -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;