Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

leds: 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 <phahn-oss@avm.de>
Link: https://patch.msgid.link/20260310-b4-is_err_or_null-v1-51-bd63b656022d@avm.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Philipp Hahn and committed by
Lee Jones
e68f95a5 e70ffd8f

+1 -1
+1 -1
drivers/leds/trigger/ledtrig-tty.c
··· 220 220 goto out; 221 221 222 222 tty = tty_kopen_shared(devno); 223 - if (IS_ERR(tty) || !tty) 223 + if (IS_ERR_OR_NULL(tty)) 224 224 /* What to do? retry or abort */ 225 225 goto out; 226 226