locktorture: Check the correct variable for allocation failure
There is a typo so this checks the wrong variable. "chains" plural vs
"chain" singular. We already know that "chains" is non-zero.
Fixes: 7f993623e9
("locktorture: Add call_rcu_chains module parameter")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
This commit is contained in:
parent
3e9b009c16
commit
cefe8ce559
@ -1075,7 +1075,7 @@ static int call_rcu_chain_init(void)
|
|||||||
if (call_rcu_chains <= 0)
|
if (call_rcu_chains <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
call_rcu_chain = kcalloc(call_rcu_chains, sizeof(*call_rcu_chain), GFP_KERNEL);
|
call_rcu_chain = kcalloc(call_rcu_chains, sizeof(*call_rcu_chain), GFP_KERNEL);
|
||||||
if (!call_rcu_chains)
|
if (!call_rcu_chain)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
for (i = 0; i < call_rcu_chains; i++) {
|
for (i = 0; i < call_rcu_chains; i++) {
|
||||||
call_rcu_chain[i].crc_stop = false;
|
call_rcu_chain[i].crc_stop = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user