Skip to contentSkip to conversation

tty: make check_tty_count() void

PATCH New Jiri Slaby (SUSE) 1 participant 1 message Jul 12, 2023 TTY layer and serial drivers

lore
Share & tools
lore

Jiri Slaby (SUSE)

author maintainer
#0 lore raw

PATCH 1/1 tty: make check_tty_count() void

The return value is unused, so drop it.

---
 drivers/tty/tty_io.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/tty_io.c +1 -3
index 3959efc717aa..e23e416aae93 100644
@@ -270,7 +270,7 @@ static int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
 }
 
 /* Caller must hold tty_lock */
-static int check_tty_count(struct tty_struct *tty, const char *routine)
+static void check_tty_count(struct tty_struct *tty, const char *routine)
 {
 #ifdef CHECK_TTY_COUNT
 	struct list_head *p;
@@ -290,10 +290,8 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
 	if (tty->count != (count + kopen_count)) {
 		tty_warn(tty, "%s: tty->count(%d) != (#fd's(%d) + #kopen's(%d))\n",
 			 routine, tty->count, count, kopen_count);
-		return (count + kopen_count);
 	}
 #endif
-	return 0;
 }
 
 /**
Signature · 1 line
2.41.0