diff options
| author | Philipp Hahn <phahn-oss@avm.de> | 2026-03-10 12:49:17 +0100 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-03-10 13:33:26 +0000 |
| commit | e68f95a51d1a8c1594b536c4d495cbea38d47561 (patch) | |
| tree | a0aeaaabc358c54a5c214e32e08789cb15199ed6 /drivers/leds/trigger | |
| parent | e70ffd8fb18d1831320b344406f387b4f37e827e (diff) | |
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>
Diffstat (limited to 'drivers/leds/trigger')
| -rw-r--r-- | drivers/leds/trigger/ledtrig-tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/trigger/ledtrig-tty.c b/drivers/leds/trigger/ledtrig-tty.c index 8eb6286b33ac..3725571144d9 100644 --- a/drivers/leds/trigger/ledtrig-tty.c +++ b/drivers/leds/trigger/ledtrig-tty.c @@ -220,7 +220,7 @@ static void ledtrig_tty_work(struct work_struct *work) goto out; tty = tty_kopen_shared(devno); - if (IS_ERR(tty) || !tty) + if (IS_ERR_OR_NULL(tty)) /* What to do? retry or abort */ goto out; |
