[v3,2/2] Revert "lib/firmware: fix a memory leak with multiple calls of trigger_batched_requests_store()"

Message ID 20230406014324.31171-2-mirsad.todorovac@alu.unizg.hr
State New
Headers
Series [v3,1/2] test_firmware: Fix some racing conditions in test_fw_config locking. |

Commit Message

Mirsad Todorovac April 6, 2023, 1:43 a.m. UTC
  This reverts commit d59ff9027c628f0e9be344b28f3576566a274f2f.
---
 lib/test_firmware.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Mirsad Todorovac April 6, 2023, 2:46 a.m. UTC | #1
On 06. 04. 2023. 03:43, Mirsad Goran Todorovac wrote:
> This reverts commit d59ff9027c628f0e9be344b28f3576566a274f2f.
> ---
>  lib/test_firmware.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/lib/test_firmware.c b/lib/test_firmware.c
> index 51377b9ab6e3..454992bfdb2a 100644
> --- a/lib/test_firmware.c
> +++ b/lib/test_firmware.c
> @@ -1036,11 +1036,6 @@ ssize_t trigger_batched_requests_async_store(struct device *dev,
>  
>  	mutex_lock(&test_fw_mutex);
>  
> -	if (test_fw_config->reqs) {
> -		rc = -EBUSY;
> -		goto out;
> -	}
> -
>  	test_fw_config->reqs =
>  		vzalloc(array3_size(sizeof(struct test_batched_req),
>  				    test_fw_config->num_requests, 2));

NOTE: This was sent by an accident with the patch sending script.
Please ignore this erroneous patch.

Best regards,
Mirsad
  

Patch

diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index 51377b9ab6e3..454992bfdb2a 100644
--- a/lib/test_firmware.c
+++ b/lib/test_firmware.c
@@ -1036,11 +1036,6 @@  ssize_t trigger_batched_requests_async_store(struct device *dev,
 
 	mutex_lock(&test_fw_mutex);
 
-	if (test_fw_config->reqs) {
-		rc = -EBUSY;
-		goto out;
-	}
-
 	test_fw_config->reqs =
 		vzalloc(array3_size(sizeof(struct test_batched_req),
 				    test_fw_config->num_requests, 2));