summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTillmann Heidsieck <theidsieck@leenox.de>2015-09-23 20:07:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 02:19:27 (GMT)
commitc739c987c1e19b924b252ebb12ffeac3ef9b1d5c (patch)
treeefab9fa5bc996b5ff9a9c4bcb82ace58a62acd51
parent4ccb726c728cb414d9abc65a11a6453e75204503 (diff)
downloadlinux-c739c987c1e19b924b252ebb12ffeac3ef9b1d5c.tar.xz
staging: wlan-ng remove redundant conditional
We exit the above loop either if curroff >= (HFA384x_PDA_LEN_MAX / 2 - 1) or if we found the END marker in the element beyond the current one. The first case is checked for in the preceding if statement, therefore the second if statement is redundant and can be removed. Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index d357b7e..f5b9727 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -631,10 +631,8 @@ static int mkpdrlist(struct pda *pda)
curroff, pda->nrec);
return 1;
}
- if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
- pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
- (pda->nrec)++;
- }
+ pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
+ (pda->nrec)++;
return result;
}