summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2025-07-14 18:17:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-16 11:05:34 +0200
commit103f5d8c35b3d22b700f1f6d585e499b2df62df6 (patch)
treeb7f37cab5b2a9a755783c2c800987a802b412618 /drivers/tty/tty_buffer.c
parenta48e897b6999eec1da6dc37e9af834dd2a88a0bb (diff)
tty: omit need_resched() before cond_resched()
There's no need to call need_resched() because cond_resched() will do nothing if need_resched() returns false. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Link: https://lore.kernel.org/r/5a11ad09-5508-933c-f044-6a236bf00557@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 79f0ff94ce00..67271fc0b223 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -499,8 +499,7 @@ static void flush_to_ldisc(struct work_struct *work)
if (!rcvd)
break;
- if (need_resched())
- cond_resched();
+ cond_resched();
}
mutex_unlock(&buf->lock);