diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 21:20:35 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-22 21:20:35 +0200 | 
| commit | 7731b8bc94e599c9a79e428f3359ff2c34b7576a (patch) | |
| tree | 879f18ccbe274122f2d4f095b43cbc7f953e0ada /lib/test_firmware.c | |
| parent | 48e315618dc4dc8904182cd221e3d395d5d97005 (diff) | |
| parent | 9ffc59d57228d74809700be6f7ecb1db10292f05 (diff) | |
Merge branch 'linus' into x86/urgent
Required to queue a dependent fix.
Diffstat (limited to 'lib/test_firmware.c')
| -rw-r--r-- | lib/test_firmware.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/test_firmware.c b/lib/test_firmware.c index cee000ac54d8..b984806d7d7b 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -618,8 +618,9 @@ static ssize_t trigger_batched_requests_store(struct device *dev,  	mutex_lock(&test_fw_mutex); -	test_fw_config->reqs = vzalloc(sizeof(struct test_batched_req) * -				       test_fw_config->num_requests * 2); +	test_fw_config->reqs = +		vzalloc(array3_size(sizeof(struct test_batched_req), +				    test_fw_config->num_requests, 2));  	if (!test_fw_config->reqs) {  		rc = -ENOMEM;  		goto out_unlock; @@ -720,8 +721,9 @@ ssize_t trigger_batched_requests_async_store(struct device *dev,  	mutex_lock(&test_fw_mutex); -	test_fw_config->reqs = vzalloc(sizeof(struct test_batched_req) * -				       test_fw_config->num_requests * 2); +	test_fw_config->reqs = +		vzalloc(array3_size(sizeof(struct test_batched_req), +				    test_fw_config->num_requests, 2));  	if (!test_fw_config->reqs) {  		rc = -ENOMEM;  		goto out;  | 
