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


Groups > linux.kernel > #1323846 > unrolled thread

[PATCH] ath10k: remove impossible code

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-02-02 08:20 +0100
Last post2016-02-02 08:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ath10k: remove impossible code Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-02 08:20 +0100

#1323846 — [PATCH] ath10k: remove impossible code

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-02-02 08:20 +0100
Subject[PATCH] ath10k: remove impossible code
Message-ID<qXDpL-7lI-3@gated-at.bofh.it>
From: Sudip Mukherjee <sudip@vectorindia.org>

len has been initialized with a value of 0 and buf_len with 4096. There
is no way that this condition (len > buf_len) can be true now.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/net/wireless/ath/ath10k/debug.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 2bdf540..8b187e0 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -2176,9 +2176,6 @@ static ssize_t ath10k_debug_fw_checksums_read(struct file *file,
 
 	mutex_lock(&ar->conf_mutex);
 
-	if (len > buf_len)
-		len = buf_len;
-
 	len += scnprintf(buf + len, buf_len - len,
 			 "firmware-N.bin\t\t%08x\n",
 			 crc32_le(0, ar->firmware->data, ar->firmware->size));
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web