Commit 488cf833 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

lib/test_firmware.c: remove some dead code

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@kadamSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 76c37f74
...@@ -631,11 +631,6 @@ static ssize_t trigger_batched_requests_store(struct device *dev, ...@@ -631,11 +631,6 @@ static ssize_t trigger_batched_requests_store(struct device *dev,
for (i = 0; i < test_fw_config->num_requests; i++) { for (i = 0; i < test_fw_config->num_requests; i++) {
req = &test_fw_config->reqs[i]; req = &test_fw_config->reqs[i];
if (!req) {
WARN_ON(1);
rc = -ENOMEM;
goto out_bail;
}
req->fw = NULL; req->fw = NULL;
req->idx = i; req->idx = i;
req->name = test_fw_config->name; req->name = test_fw_config->name;
...@@ -737,10 +732,6 @@ ssize_t trigger_batched_requests_async_store(struct device *dev, ...@@ -737,10 +732,6 @@ ssize_t trigger_batched_requests_async_store(struct device *dev,
for (i = 0; i < test_fw_config->num_requests; i++) { for (i = 0; i < test_fw_config->num_requests; i++) {
req = &test_fw_config->reqs[i]; req = &test_fw_config->reqs[i];
if (!req) {
WARN_ON(1);
goto out_bail;
}
req->name = test_fw_config->name; req->name = test_fw_config->name;
req->fw = NULL; req->fw = NULL;
req->idx = i; req->idx = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment