projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95a4919
)
staging: wlan-ng: small cleanup in plugimage()
author
Archana
<craechal@gmail.com>
Sat, 11 Mar 2023 12:12:53 +0000
(12:12 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 16 Mar 2023 08:43:51 +0000
(09:43 +0100)
It's cleaner to set "j = -1;" before the if block and remove the else
statement.
Signed-off-by: Archana <craechal@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link:
https://lore.kernel.org/r/20230311121253.10225-2-craechal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2fw.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wlan-ng/prism2fw.c
b/drivers/staging/wlan-ng/prism2fw.c
index
98ed9bb
..
1165886
100644
(file)
--- a/
drivers/staging/wlan-ng/prism2fw.c
+++ b/
drivers/staging/wlan-ng/prism2fw.c
@@
-689,6
+689,7
@@
static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks,
for (i = 0; i < ns3plug; i++) {
pstart = s3plug[i].addr;
pend = s3plug[i].addr + s3plug[i].len;
+ j = -1;
/* find the matching PDR (or filename) */
if (s3plug[i].itemcode != 0xffffffffUL) { /* not filename */
for (j = 0; j < pda->nrec; j++) {
@@
-696,8
+697,6
@@
static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks,
le16_to_cpu(pda->rec[j]->code))
break;
}
- } else {
- j = -1;
}
if (j >= pda->nrec && j != -1) { /* if no matching PDR, fail */
pr_warn("warning: Failed to find PDR for plugrec 0x%04x.\n",