Skip to content

Commit e68f95a

Browse files
pmhahnlag-linaro
authored andcommitted
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>
1 parent e70ffd8 commit e68f95a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/leds/trigger/ledtrig-tty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static void ledtrig_tty_work(struct work_struct *work)
220220
goto out;
221221

222222
tty = tty_kopen_shared(devno);
223-
if (IS_ERR(tty) || !tty)
223+
if (IS_ERR_OR_NULL(tty))
224224
/* What to do? retry or abort */
225225
goto out;
226226

0 commit comments

Comments
 (0)