mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
rcutorture: Don't compare ptr with 0
Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
4930521ae1
commit
de5e64378e
@ -1749,7 +1749,7 @@ static int rcu_torture_barrier_init(void)
|
|||||||
barrier_cbs_wq =
|
barrier_cbs_wq =
|
||||||
kzalloc(n_barrier_cbs * sizeof(barrier_cbs_wq[0]),
|
kzalloc(n_barrier_cbs * sizeof(barrier_cbs_wq[0]),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (barrier_cbs_tasks == NULL || barrier_cbs_wq == 0)
|
if (barrier_cbs_tasks == NULL || !barrier_cbs_wq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
for (i = 0; i < n_barrier_cbs; i++) {
|
for (i = 0; i < n_barrier_cbs; i++) {
|
||||||
init_waitqueue_head(&barrier_cbs_wq[i]);
|
init_waitqueue_head(&barrier_cbs_wq[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user