From: Philipp Hahn Date: Tue, 10 Mar 2026 11:48:42 +0000 (+0100) Subject: sched: Prefer IS_ERR_OR_NULL over manual NULL check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98059335382dc5870207d6a0c1c9e7a004d627ad;p=thirdparty%2Fkernel%2Flinux.git sched: Prefer IS_ERR_OR_NULL over manual NULL check Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle. Signed-off-by: Philipp Hahn Signed-off-by: Tejun Heo --- diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 07476355bfd52..93a230859dd7c 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -4529,7 +4529,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);