Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle.
To: Tejun Heo <[email protected]> To: David Vernet <[email protected]> To: Andrea Righi <[email protected]> To: Changwoo Min <[email protected]> To: Ingo Molnar <[email protected]> To: Peter Zijlstra <[email protected]> To: Juri Lelli <[email protected]> To: Vincent Guittot <[email protected]> To: Dietmar Eggemann <[email protected]> To: Steven Rostedt <[email protected]> To: Ben Segall <[email protected]> To: Mel Gorman <[email protected]> To: Valentin Schneider <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 1594987d637b09e586ae788b7f2e6336332d605a..cfa869bd7de5406a5ca094992ab04c62b0e92fd0 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3688,7 +3688,7 @@ static void scx_sched_free_rcu_work(struct work_struct *work) do { rhashtable_walk_start(&rht_iter); - while ((dsq = rhashtable_walk_next(&rht_iter)) && !IS_ERR(dsq)) + while (!IS_ERR_OR_NULL((dsq = rhashtable_walk_next(&rht_iter)))) destroy_dsq(sch, dsq->id); rhashtable_walk_stop(&rht_iter); -- 2.43.0
