projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76c37f7
)
lib/test_firmware.c: remove some dead code
author
Dan Carpenter
<
[email protected]
>
Fri, 8 Mar 2019 00:28:28 +0000
(16:28 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 8 Mar 2019 02:32:00 +0000
(18:32 -0800)
The test_fw_config->reqs allocation succeeded so these addresses can't
be NULL.
Also on the second error path, we forgot to set "rc = -ENOMEM;".
Link:
http://lkml.kernel.org/r/20190221183700.GA1737@kadam
Signed-off-by: Dan Carpenter <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Cc: "Luis R. Rodriguez" <
[email protected]
>
Cc: Randy Dunlap <
[email protected]
>
Cc: Greg Kroah-Hartman <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/test_firmware.c
patch
|
blob
|
history
diff --git
a/lib/test_firmware.c
b/lib/test_firmware.c
index 7cab9a9869ace92900ec58aabffa175d2249296d..7222093ee00beeffb3a09317466cc1da4cc0c669 100644
(file)
--- a/
lib/test_firmware.c
+++ b/
lib/test_firmware.c
@@
-631,11
+631,6
@@
static ssize_t trigger_batched_requests_store(struct device *dev,
for (i = 0; i < test_fw_config->num_requests; i++) {
req = &test_fw_config->reqs[i];
- if (!req) {
- WARN_ON(1);
- rc = -ENOMEM;
- goto out_bail;
- }
req->fw = NULL;
req->idx = i;
req->name = test_fw_config->name;
@@
-737,10
+732,6
@@
ssize_t trigger_batched_requests_async_store(struct device *dev,
for (i = 0; i < test_fw_config->num_requests; i++) {
req = &test_fw_config->reqs[i];
- if (!req) {
- WARN_ON(1);
- goto out_bail;
- }
req->name = test_fw_config->name;
req->fw = NULL;
req->idx = i;