summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ipw2x00/ipw2200.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-10-09 13:59:39 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-10-27 21:16:14 +0300
commit9fdc723abf50e3317387f712c5c1b70f86ac0d74 (patch)
treeef38ff6da94a4a953ae7ec33159a1e26866fe208 /drivers/net/wireless/ipw2x00/ipw2200.c
parent2aa01652cf85f3e5885b173a2f4c53080046c6e0 (diff)
downloadlinux-9fdc723abf50e3317387f712c5c1b70f86ac0d74.tar.xz
ipw2x00: clean up a condition
The original condition was "(PAGE_SIZE - len)" when "(len < PAGE_SIZE)" is intended. This condition is not really sufficient, but also not really needed... If "len > PAGE_SIZE" then it we will print a warning message in dmesg but there are no other effects. Maybe we should just remove the condition? Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index edc344334a75..67cad9b05ad8 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -1363,7 +1363,7 @@ static ssize_t show_cmd_log(struct device *d,
if (!priv->cmdlog)
return 0;
for (i = (priv->cmdlog_pos + 1) % priv->cmdlog_len;
- (i != priv->cmdlog_pos) && (PAGE_SIZE - len);
+ (i != priv->cmdlog_pos) && (len < PAGE_SIZE);
i = (i + 1) % priv->cmdlog_len) {
len +=
snprintf(buf + len, PAGE_SIZE - len,