From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:31
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Ilya Dryomov <idryomov@gmail.com>
To: Alex Markuze <amarkuze@redhat.com>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/ceph/dir.c | 2 +-
fs/ceph/snap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:32
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Phillip Lougher <phillip@squashfs.org.uk>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/squashfs/cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:36
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
IS_ERR_OR_NULL() already uses likely(!ptr) internally. checkpatch does
not like nesting it:
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:36
Find and convert uses of IS_ERR() plus NULL check to IS_ERR_OR_NULL().
There are several cases where `!ptr && WARN_ON[_ONCE](IS_ERR(ptr))` is
used:
- arch/x86/kernel/callthunks.c:215 WARN_ON_ONCE
- drivers/clk/clk.c:4561 WARN_ON_ONCE
- drivers/interconnect/core.c:793 WARN_ON
- drivers/reset/core.c:718 WARN_ON
The change is not 100% semantical equivalent as the warning will now
also happen when the pointer is NULL.
To: Julia Lawall <Julia.Lawall@inria.fr>
To: Nicolas Palix <nicolas.palix@imag.fr>
Cc: cocci@inria.fr
Cc: linux-kernel@vger.kernel.org
---
drivers/clocksource/mips-gic-timer.c:283 looks suspicious: ret != clk,
but Daniel Lezcano verified it as cottect.
There are some cases where the checks are part of a larger expression:
- mm/kmemleak.c:1095
- mm/kmemleak.c:1155
- mm/kmemleak.c:1173
- mm/kmemleak.c:1290
- mm/kmemleak.c:1328
- mm/kmemleak.c:1241
- mm/kmemleak.c:1310
- mm/kmemleak.c:1258
- net/netlink/af_netlink.c:2670
Thanks to Julia Lawall for the help to also handle them.
Signed-off-by: Philipp Hahn <redacted>
---
scripts/coccinelle/api/is_err_or_null.cocci | 125 ++++++++++++++++++++++++++++
1 file changed, 125 insertions(+)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:37
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Gao Xiang <xiang@kernel.org>
To: Chao Yu <chao@kernel.org>
To: Yue Hu <zbestahu@gmail.com>
To: Jeffle Xu <jefflexu@linux.alibaba.com>
To: Sandeep Dhavale <dhavale@google.com>
To: Hongbo Li <redacted>
To: Chunhai Guo <guochunhai@vivo.com>
Cc: linux-erofs@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/erofs/zdata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1227,7 +1227,7 @@ static int z_erofs_parse_in_bvecs(struct z_erofs_backend *be, bool *overlapped)structpage*page=bvec->page;/* compressed data ought to be valid when decompressing */-if(IS_ERR(page)||!page){+if(IS_ERR_OR_NULL(page)){bvec->page=NULL;/* clear the failure reason */err=page?PTR_ERR(page):-EIO;continue;
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:37
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: gfs2@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/gfs2/glock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:37
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/ntfs3/fsntfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:39
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Liam Girdwood <lgirdwood@gmail.com>
To: Mark Brown <broonie@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
sound/soc/samsung/i2s.c | 4 ++--
sound/soc/xtensa/xtfpga-i2s.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -559,7 +559,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs,clk_id=1;if(!any_active(i2s)){-if(priv->op_clk&&!IS_ERR(priv->op_clk)){+if(!IS_ERR_OR_NULL(priv->op_clk)){if((clk_id&&!(mod&rsrc_mask))||(!clk_id&&(mod&rsrc_mask))){clk_disable_unprepare(priv->op_clk);
@@ -812,7 +812,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,i2s->frmclk=params_rate(params);rclksrc=priv->clk_table[CLK_I2S_RCLK_SRC];-if(rclksrc&&!IS_ERR(rclksrc))+if(!IS_ERR_OR_NULL(rclksrc))priv->rclk_srcrate=clk_get_rate(rclksrc);return0;
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:39
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eric Van Hensbergen <ericvh@kernel.org>
To: Latchesar Ionkov <lucho@ionkov.net>
To: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: v9fs@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/9p/fid.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:40
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Kees Cook <kees@kernel.org>
To: Tony Luck <tony.luck@intel.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/pstore/zone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:40
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Tejun Heo <tj@kernel.org>
To: David Vernet <void@manifault.com>
To: Andrea Righi <arighi@nvidia.com>
To: Changwoo Min <changwoo@igalia.com>
To: Ingo Molnar <mingo@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
To: Juri Lelli <juri.lelli@redhat.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
To: Ben Segall <bsegall@google.com>
To: Mel Gorman <mgorman@suse.de>
To: Valentin Schneider <vschneid@redhat.com>
Cc: sched-ext@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
kernel/sched/ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:41
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Steve French <redacted>
To: Paulo Alcantara <pc@manguebit.org>
To: Ronnie Sahlberg <ronniesahlberg@gmail.com>
To: Shyam Prasad N <sprasad@microsoft.com>
To: Tom Talpey <tom@talpey.com>
To: Bharath SM <bharathsm@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/smb/client/cifsglob.h | 2 +-
fs/smb/client/connect.c | 2 +-
fs/smb/client/readdir.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:41
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/seq_file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -226,7 +226,7 @@ ssize_t seq_read_iter(struct kiocb *iocb, struct iov_iter *iter)p=m->op->start(m,&m->index);while(1){err=PTR_ERR(p);-if(!p||IS_ERR(p))// EOF or an error+if(IS_ERR_OR_NULL(p))// EOF or an errorbreak;err=m->op->show(m,p);if(err<0)// hard error
@@ -266,7 +266,7 @@ ssize_t seq_read_iter(struct kiocb *iocb, struct iov_iter *iter)m->op->next);m->index++;}-if(!p||IS_ERR(p))// no next record for us+if(IS_ERR_OR_NULL(p))// no next record for usbreak;if(m->count>=iov_iter_count(iter))break;
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:42
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Andrew Morton <akpm@linux-foundation.org>
To: Luis Chamberlain <mcgrof@kernel.org>
To: Petr Pavlu <petr.pavlu@suse.com>
To: Daniel Gomez <da.gomez@kernel.org>
To: Sami Tolvanen <samitolvanen@google.com>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-modules@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
lib/test_firmware.c | 2 +-
lib/test_kmod.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:43
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Luis Chamberlain <mcgrof@kernel.org>
To: Petr Pavlu <petr.pavlu@suse.com>
To: Daniel Gomez <da.gomez@kernel.org>
To: Sami Tolvanen <samitolvanen@google.com>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
kernel/module/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:44
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Jon Maloy <jmaloy@redhat.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: tipc-discussion@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/tipc/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:44
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-trace-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
kernel/trace/fprobe.c | 2 +-
kernel/trace/kprobe_event_gen_test.c | 2 +-
kernel/trace/trace_events_hist.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:44
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
virt/kvm/eventfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:44
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: John Crispin <john@phrozen.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
arch/mips/lantiq/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:44
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Marcel Holtmann <marcel@holtmann.org>
To: Johan Hedberg <redacted>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/bluetooth/mgmt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:45
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Alasdair Kergon <agk@redhat.com>
To: Mike Snitzer <snitzer@kernel.org>
To: Mikulas Patocka <mpatocka@redhat.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: dm-devel@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/md/dm-cache-metadata.c | 2 +-
drivers/md/dm-crypt.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:45
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/fuse/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:45
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Jan Kara <jack@suse.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/quota/quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:46
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Andrzej Hajda <andrzej.hajda@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Robert Foss <rfoss@kernel.org>
To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
To: Jonas Karlman <jonas@kwiboo.se>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
To: Zhenyu Wang <zhenyuw.linux@gmail.com>
To: Zhi Wang <zhi.wang.linux@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>
To: Alex Deucher <alexander.deucher@amd.com>
To: "Christian König" <christian.koenig@amd.com>
To: Sandy Huang <hjc@rock-chips.com>
To: "Heiko Stübner" <heiko@sntech.de>
To: Andy Yan <andy.yan@rock-chips.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
drivers/gpu/drm/drm_sysfs.c | 2 +-
drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++--
drivers/gpu/drm/radeon/radeon_test.c | 2 +-
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:46
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: John Johansen <john.johansen@canonical.com>
To: Paul Moore <paul@paul-moore.com>
To: James Morris <jmorris@namei.org>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: apparmor@lists.ubuntu.com
Cc: linux-security-module@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
security/apparmor/apparmorfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -352,7 +352,7 @@ static void aafs_remove(struct dentry *dentry){structinode*dir;-if(!dentry||IS_ERR(dentry))+if(IS_ERR_OR_NULL(dentry))return;/* ->d_parent is stable as rename is not supported */
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:47
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Rich Felker <dalias@libc.org>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
arch/sh/mm/ioremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:48
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle and adapted by hand.
To: Catalin Marinas <catalin.marinas@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
mm/kmemleak.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:49
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Trond Myklebust <trondmy@kernel.org>
To: Anna Schumaker <anna@kernel.org>
To: Chuck Lever <redacted>
To: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neil@brown.name>
To: Olga Kornievskaia <okorniev@redhat.com>
To: Dai Ngo <Dai.Ngo@oracle.com>
To: Tom Talpey <tom@talpey.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: linux-nfs@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -578,7 +578,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)errout:/* Take a reference in case the DTO handler runs */svc_xprt_get(&newxprt->sc_xprt);-if(newxprt->sc_qp&&!IS_ERR(newxprt->sc_qp))+if(!IS_ERR_OR_NULL(newxprt->sc_qp))ib_destroy_qp(newxprt->sc_qp);rdma_destroy_id(newxprt->sc_cm_id);rpcrdma_rn_unregister(dev,&newxprt->sc_rn);
@@ -608,7 +608,7 @@ static void svc_rdma_free(struct svc_xprt *xprt)might_sleep();/* This blocks until the Completion Queues are empty */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_drain_qp(rdma->sc_qp);flush_workqueue(svcrdma_wq);
@@ -619,16 +619,16 @@ static void svc_rdma_free(struct svc_xprt *xprt)svc_rdma_recv_ctxts_destroy(rdma);/* Destroy the QP if present (not a listener) */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_destroy_qp(rdma->sc_qp);-if(rdma->sc_sq_cq&&!IS_ERR(rdma->sc_sq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_sq_cq))ib_free_cq(rdma->sc_sq_cq);-if(rdma->sc_rq_cq&&!IS_ERR(rdma->sc_rq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_rq_cq))ib_free_cq(rdma->sc_rq_cq);-if(rdma->sc_pd&&!IS_ERR(rdma->sc_pd))+if(!IS_ERR_OR_NULL(rdma->sc_pd))ib_dealloc_pd(rdma->sc_pd);/* Destroy the CM ID */
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:49
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: "Martin K. Petersen" <redacted>
Cc: linux-scsi@vger.kernel.org
Cc: target-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/target/target_core_fabric_configfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:49
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Alexei Starovoitov <ast@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
To: "David S. Miller" <davem@davemloft.net>
To: Jakub Kicinski <kuba@kernel.org>
To: Jesper Dangaard Brouer <hawk@kernel.org>
To: John Fastabend <john.fastabend@gmail.com>
To: Stanislav Fomichev <sdf@fomichev.me>
To: Eric Dumazet <edumazet@google.com>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/core/xdp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:49
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Marc Zyngier <maz@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
To: Gregory Clement <gregory.clement@bootlin.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/irqchip/irq-gic-v3.c | 2 +-
drivers/irqchip/irq-mvebu-odmi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Jamal Hadi Salim <jhs@mojatatu.com>
To: Jiri Pirko <jiri@resnulli.us>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/sched/cls_api.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Igor Russkikh <redacted>
To: Andrew Lunn <andrew+netdev@lunn.ch>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Pavan Chebbi <pavan.chebbi@broadcom.com>
To: Michael Chan <mchan@broadcom.com>
To: Potnuri Bharat Teja <bharat@chelsio.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Taras Chornyi <redacted>
To: Maxime Coquelin <mcoquelin.stm32@gmail.com>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>
To: Iyappan Subramanian <iyappan@os.amperecomputing.com>
To: Keyur Chudgar <keyur@os.amperecomputing.com>
To: Quan Nguyen <quan@os.amperecomputing.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
To: Russell King <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: intel-wired-lan@lists.osuosl.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-usb@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 2 +-
drivers/net/ethernet/broadcom/tg3.c | 2 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 +--
drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 +-
drivers/net/ethernet/marvell/prestera/prestera_router.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/mdio/mdio-xgene.c | 2 +-
drivers/net/usb/r8152.c | 2 +-
8 files changed, 8 insertions(+), 9 deletions(-)
@@ -1275,7 +1275,7 @@ static int stmmac_init_phy(struct net_device *dev)/* Some DT bindings do not set-up the PHY handle. Let's try to*manuallyparseit*/-if(!phy_fwnode||IS_ERR(phy_fwnode)){+if(IS_ERR_OR_NULL(phy_fwnode)){intaddr=priv->plat->phy_addr;structphy_device*phydev;
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Vinod Koul <vkoul@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: linux-phy@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/phy/phy-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: "David S. Miller" <davem@davemloft.net>
To: David Ahern <dsahern@kernel.org>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/ipv6/ila/ila_xlat.c | 2 +-
net/ipv6/ndisc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -545,7 +545,7 @@ int ila_xlat_nl_dump(struct sk_buff *skb, struct netlink_callback *cb)/* Get first entry */ila=rhashtable_walk_peek(rhiter);-if(ila&&!IS_ERR(ila)&&skip){+if(!IS_ERR_OR_NULL(ila)&&skip){/* Skip over visited entries */while(ila&&skip){
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
arch/arm/common/bL_switcher.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -628,7 +628,7 @@ static void bL_switcher_disable(void)t=&bL_threads[cpu];task=t->task;t->task=NULL;-if(!task||IS_ERR(task))+if(IS_ERR_OR_NULL(task))continue;kthread_stop(task);/* no more switch may happen on this CPU at this point */
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: linux-sctp@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/sctp/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Mark Greer <mgreer@animalcreek.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/nfc/trf7970a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:50
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/wireless/reg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:51
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Dave Penkler <dpenkler@gmail.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/gpib/common/iblib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -249,7 +249,7 @@ int iboffline(struct gpib_board *board)if(!board->interface)return-ENODEV;-if(board->autospoll_task&&!IS_ERR(board->autospoll_task)){+if(!IS_ERR_OR_NULL(board->autospoll_task)){retval=kthread_stop(board->autospoll_task);if(retval)dev_err(board->gpib_dev,"kthread_stop returned %i\n",retval);
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:51
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Linus Walleij <linusw@kernel.org>
Cc: linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/pinctrl/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:51
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Shuah Khan <skhan@linuxfoundation.org>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/media/test-drivers/vimc/vimc-streamer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -167,7 +167,7 @@ static int vimc_streamer_thread(void *data)for(i=stream->pipe_size-1;i>=0;i--){frame=stream->ved_pipeline[i]->process_frame(stream->ved_pipeline[i],frame);-if(!frame||IS_ERR(frame))+if(IS_ERR_OR_NULL(frame))break;}//wait for 60hz
@@ -746,7 +746,7 @@ static int rockchip_pd_attach_dev(struct generic_pm_domain *genpd,}i=0;-while((clk=of_clk_get(dev->of_node,i++))&&!IS_ERR(clk)){+while(!IS_ERR_OR_NULL((clk=of_clk_get(dev->of_node,i++)))){dev_dbg(dev,"adding clock '%pC' to list of PM clocks\n",clk);error=pm_clk_add_clk(dev,clk);if(error){
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:51
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Alex Williamson <alex@shazbot.org>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/vfio/vfio_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:52
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eduardo Valentin <edubezval@gmail.com>
To: Keerthy <j-keerthy@ti.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
To: Daniel Lezcano <daniel.lezcano@kernel.org>
To: Zhang Rui <rui.zhang@intel.com>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -228,7 +228,7 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)return0;data=ti_bandgap_get_sensor_data(bgp,id);-if(!data||IS_ERR(data))+if(IS_ERR_OR_NULL(data))data=ti_thermal_build_data(bgp,id);if(!data)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:52
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>
To: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/mtd/nand/raw/gpio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:52
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Semantich change: Previously the code only printed the warning on error,
but not when the pointer was NULL. Now the warning is printed in both
cases!
Change found with coccinelle.
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/reset/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:52
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: "K. Y. Srinivasan" <kys@microsoft.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
To: Wei Liu <wei.liu@kernel.org>
To: Dexuan Cui <decui@microsoft.com>
To: Long Li <longli@microsoft.com>
Cc: linux-hyperv@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/hv/mshv_eventfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:53
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eric Van Hensbergen <ericvh@kernel.org>
To: Latchesar Ionkov <lucho@ionkov.net>
To: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: v9fs@lists.linux.dev
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
include/net/9p/client.h | 2 +-
net/9p/trans_rdma.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:53
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Semantich change: Previously the code only printed the warning on error,
but not when the pointer was NULL. Now the warning is printed in both
cases!
Change found with coccinelle.
To: Michael Turquette <redacted>
To: Stephen Boyd <sboyd@kernel.org>
To: Daniel Lezcano <daniel.lezcano@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/clk/clk.c | 4 ++--
drivers/clocksource/timer-pxa.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -1482,7 +1482,7 @@ static void alps_report_bare_ps2_packet(struct psmouse *psmouse,/* On V2 devices the DualPoint Stick reports bare packets */dev=priv->dev2;dev2=psmouse->dev;-}elseif(unlikely(IS_ERR_OR_NULL(priv->dev3))){+}elseif(IS_ERR_OR_NULL(priv->dev3)){/* Register dev3 mouse if we received PS/2 packet first time */if(!IS_ERR(priv->dev3))psmouse_queue_work(psmouse,&priv->dev3_register_work,
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:54
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
IS_ERR_OR_NULL() already uses likely(!ptr) internally. checkpatch does
not like nesting it:
Remove the explicit use of likely().
Semantich change: Previously the code only printed the warning on error,
but not when the pointer was NULL. Now the warning is printed in both
cases!
Change found with coccinelle.
To: Thomas Gleixner <tglx@kernel.org>
To: Ingo Molnar <mingo@redhat.com>
To: Borislav Petkov <bp@alien8.de>
To: Dave Hansen <dave.hansen@linux.intel.com>
To: x86@kernel.org
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
arch/x86/kernel/callthunks.c | 2 +-
arch/x86/kernel/irq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:54
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Heiko Carstens <hca@linux.ibm.com>
To: Vasily Gorbik <gor@linux.ibm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/s390/char/tape_class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Remove the explicit use of unlikely().
Change generated with coccinelle.
To: Christian Brauner <brauner@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
include/linux/file.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:56
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Lee Jones <lee@kernel.org>
To: Pavel Machek <pavel@kernel.org>
Cc: linux-leds@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/leds/trigger/ledtrig-tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:56
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/netlink/af_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:58
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Joerg Roedel <joro@8bytes.org>
To: Will Deacon <will@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/iommu/omap-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:58
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Justin Sanders <justin@coraid.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/block/aoe/aoecmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Philipp Hahn <hidden> Date: 2026-03-10 11:55:58
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Semantich change: Previously the code only printed the warning on error,
but not when the pointer was NULL. Now the warning is printed in both
cases!
Change found with coccinelle.
To: Georgi Djakov <djakov@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/interconnect/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Remove the explicit use of likely().
Change generated with coccinelle.
To: Andrew Morton <akpm@linux-foundation.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
lib/debugobjects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1024,7 +1024,7 @@ void debug_object_assert_init(void *addr, const struct debug_obj_descr *descr)raw_spin_lock_irqsave(&db->lock,flags);obj=lookup_object_or_alloc(addr,db,descr,false,true);raw_spin_unlock_irqrestore(&db->lock,flags);-if(likely(!IS_ERR_OR_NULL(obj)))+if(!IS_ERR_OR_NULL(obj))return;/* If NULL the allocation has hit OOM */
From: Christian König <christian.koenig@amd.com> Date: 2026-03-10 12:09:23
On 3/10/26 12:49, Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Looks like a reasonable cleanup but could be that driver maintainers want to take that through their individual branches to avoid conflicts.
Alternatively when the i915 and rockship maintainers say that they are fine with the change I'm happy to push this to drm-misc-next.
Regards,
Christian.
quoted hunk
Change generated with coccinelle.
To: Andrzej Hajda <andrzej.hajda@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Robert Foss <rfoss@kernel.org>
To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
To: Jonas Karlman <jonas@kwiboo.se>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
To: Zhenyu Wang <zhenyuw.linux@gmail.com>
To: Zhi Wang <zhi.wang.linux@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>
To: Alex Deucher <alexander.deucher@amd.com>
To: "Christian König" <christian.koenig@amd.com>
To: Sandy Huang <hjc@rock-chips.com>
To: "Heiko Stübner" <heiko@sntech.de>
To: Andy Yan <andy.yan@rock-chips.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
drivers/gpu/drm/drm_sysfs.c | 2 +-
drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++--
drivers/gpu/drm/radeon/radeon_test.c | 2 +-
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
Remove the explicit use of unlikely().
Change generated with coccinelle.
To: Christian Brauner <brauner@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
include/linux/file.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jeff Layton <jlayton@kernel.org> Date: 2026-03-10 12:23:33
On Tue, 2026-03-10 at 12:48 +0100, Philipp Hahn wrote:
quoted hunk
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Trond Myklebust <trondmy@kernel.org>
To: Anna Schumaker <anna@kernel.org>
To: Chuck Lever <redacted>
To: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neil@brown.name>
To: Olga Kornievskaia <okorniev@redhat.com>
To: Dai Ngo <Dai.Ngo@oracle.com>
To: Tom Talpey <tom@talpey.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: linux-nfs@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -578,7 +578,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)errout:/* Take a reference in case the DTO handler runs */svc_xprt_get(&newxprt->sc_xprt);-if(newxprt->sc_qp&&!IS_ERR(newxprt->sc_qp))+if(!IS_ERR_OR_NULL(newxprt->sc_qp))ib_destroy_qp(newxprt->sc_qp);rdma_destroy_id(newxprt->sc_cm_id);rpcrdma_rn_unregister(dev,&newxprt->sc_rn);
@@ -608,7 +608,7 @@ static void svc_rdma_free(struct svc_xprt *xprt)might_sleep();/* This blocks until the Completion Queues are empty */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_drain_qp(rdma->sc_qp);flush_workqueue(svcrdma_wq);
@@ -619,16 +619,16 @@ static void svc_rdma_free(struct svc_xprt *xprt)svc_rdma_recv_ctxts_destroy(rdma);/* Destroy the QP if present (not a listener) */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_destroy_qp(rdma->sc_qp);-if(rdma->sc_sq_cq&&!IS_ERR(rdma->sc_sq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_sq_cq))ib_free_cq(rdma->sc_sq_cq);-if(rdma->sc_rq_cq&&!IS_ERR(rdma->sc_rq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_rq_cq))ib_free_cq(rdma->sc_rq_cq);-if(rdma->sc_pd&&!IS_ERR(rdma->sc_pd))+if(!IS_ERR_OR_NULL(rdma->sc_pd))ib_dealloc_pd(rdma->sc_pd);/* Destroy the CM ID */
From: Mark Brown <broonie@kernel.org> Date: 2026-03-10 12:28:34
On Tue, Mar 10, 2026 at 12:48:44PM +0100, Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
I can't tell what the dependency story is here, it looks like there's
none? If that's the case you shouldn't send things as a single series,
send separate patches to the various subsystems.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
From: Philipp Zabel <p.zabel@pengutronix.de> Date: 2026-03-10 12:44:17
Hi Philipp,
On Di, 2026-03-10 at 12:49 +0100, Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Semantich change: Previously the code only printed the warning on error,
but not when the pointer was NULL. Now the warning is printed in both
cases!
No, rstc == NULL is valid (for optional reset controls) and must not
throw a warning.
regards
Philipp
On Tue, Mar 10, 2026 at 12:49:12PM +0100, Philipp Hahn wrote:
quoted hunk
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Alex Williamson <alex@shazbot.org>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
drivers/vfio/vfio_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Pranjal Shrivastava <praan@google.com>
The cleanup alone looks fine, but I'm not sure if the maintainers would
be happy about the tree-wide spam, since each patch might go through a
different tree. I'd wait for Alex's preference/ack on that.
Thanks,
Praan
From: Brian Masney <hidden> Date: 2026-03-10 13:22:07
On Tue, Mar 10, 2026 at 12:49:22PM +0100, Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Semantich change: Previously the code only printed the warning on error,
Semantic ...
but not when the pointer was NULL. Now the warning is printed in both
cases!
Change found with coccinelle.
To: Michael Turquette <redacted>
To: Stephen Boyd <sboyd@kernel.org>
To: Daniel Lezcano <daniel.lezcano@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
With the minor typo addressed:
Reviewed-by: Brian Masney <redacted>
From: Chuck Lever <hidden> Date: 2026-03-10 13:24:11
On 3/10/26 7:48 AM, Philipp Hahn wrote:
quoted hunk
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Trond Myklebust <trondmy@kernel.org>
To: Anna Schumaker <anna@kernel.org>
To: Chuck Lever <redacted>
To: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neil@brown.name>
To: Olga Kornievskaia <okorniev@redhat.com>
To: Dai Ngo <Dai.Ngo@oracle.com>
To: Tom Talpey <tom@talpey.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: linux-nfs@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -578,7 +578,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)errout:/* Take a reference in case the DTO handler runs */svc_xprt_get(&newxprt->sc_xprt);-if(newxprt->sc_qp&&!IS_ERR(newxprt->sc_qp))+if(!IS_ERR_OR_NULL(newxprt->sc_qp))ib_destroy_qp(newxprt->sc_qp);rdma_destroy_id(newxprt->sc_cm_id);rpcrdma_rn_unregister(dev,&newxprt->sc_rn);
@@ -608,7 +608,7 @@ static void svc_rdma_free(struct svc_xprt *xprt)might_sleep();/* This blocks until the Completion Queues are empty */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_drain_qp(rdma->sc_qp);flush_workqueue(svcrdma_wq);
@@ -619,16 +619,16 @@ static void svc_rdma_free(struct svc_xprt *xprt)svc_rdma_recv_ctxts_destroy(rdma);/* Destroy the QP if present (not a listener) */-if(rdma->sc_qp&&!IS_ERR(rdma->sc_qp))+if(!IS_ERR_OR_NULL(rdma->sc_qp))ib_destroy_qp(rdma->sc_qp);-if(rdma->sc_sq_cq&&!IS_ERR(rdma->sc_sq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_sq_cq))ib_free_cq(rdma->sc_sq_cq);-if(rdma->sc_rq_cq&&!IS_ERR(rdma->sc_rq_cq))+if(!IS_ERR_OR_NULL(rdma->sc_rq_cq))ib_free_cq(rdma->sc_rq_cq);-if(rdma->sc_pd&&!IS_ERR(rdma->sc_pd))+if(!IS_ERR_OR_NULL(rdma->sc_pd))ib_dealloc_pd(rdma->sc_pd);/* Destroy the CM ID */
Reviewed-by: Chuck Lever <redacted>
--
Chuck Lever
From: Christian Schoenebeck <linux_oss@crudebyte.com> Date: 2026-03-10 13:45:36
On Tuesday, 10 March 2026 12:48:32 CET Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eric Van Hensbergen <ericvh@kernel.org>
To: Latchesar Ionkov <lucho@ionkov.net>
To: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: v9fs@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
fs/9p/fid.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
"fs/9p" in the subject on this one, please, not just "9p".
Except of that:
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
quoted hunk
diff --git a/fs/9p/fid.h b/fs/9p/fid.h
index
0d6138bee2a3d1ab565ab2d210c0a3f3bf97e4e3..3bb7ef4380e972a2d9ab67eb4aab6cc5b
fe2eea7 100644 --- a/fs/9p/fid.h
From: Christian Schoenebeck <linux_oss@crudebyte.com> Date: 2026-03-10 13:47:23
On Tuesday, 10 March 2026 12:48:50 CET Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Eric Van Hensbergen <ericvh@kernel.org>
To: Latchesar Ionkov <lucho@ionkov.net>
To: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
To: Simon Horman <horms@kernel.org>
Cc: v9fs@lists.linux.dev
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>
---
include/net/9p/client.h | 2 +-
net/9p/trans_rdma.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
*fid)
static inline int p9_fid_put(struct p9_fid *fid)
{
- if (!fid || IS_ERR(fid))
+ if (IS_ERR_OR_NULL(fid))
return 0;
if (tracepoint_enabled(9p_fid_ref))
*rdma) if (!rdma)
return;
- if (rdma->qp && !IS_ERR(rdma->qp))
+ if (!IS_ERR_OR_NULL(rdma->qp))
ib_destroy_qp(rdma->qp);
- if (rdma->pd && !IS_ERR(rdma->pd))
+ if (!IS_ERR_OR_NULL(rdma->pd))
ib_dealloc_pd(rdma->pd);
- if (rdma->cq && !IS_ERR(rdma->cq))
+ if (!IS_ERR_OR_NULL(rdma->cq))
ib_free_cq(rdma->cq);
- if (rdma->cm_id && !IS_ERR(rdma->cm_id))
+ if (!IS_ERR_OR_NULL(rdma->cm_id))
rdma_destroy_id(rdma->cm_id);
kfree(rdma);
On Tue, 2026-03-10 at 12:48 +0100, Philipp Hahn wrote:
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Marcel Holtmann <marcel@holtmann.org>
To: Johan Hedberg <redacted>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Philipp Hahn <redacted>