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>
master
Philipp Hahn 2026-03-10 12:49:17 +01:00 committed by Lee Jones
parent e70ffd8fb1
commit e68f95a51d
1 changed files with 1 additions and 1 deletions

View File

@ -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;