diff options
author | Jiri Slaby <jirislaby@kernel.org> | 2023-07-31 10:02:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-31 17:16:05 +0200 |
commit | 9b5752d1a882c96c0319aebe55bbfe9ad0c9aa30 (patch) | |
tree | d80961554efa954292cb179b33ece1a73445b131 /drivers/misc | |
parent | misc: ti-st: remove ptr from recv functions (diff) | |
download | linux-9b5752d1a882c96c0319aebe55bbfe9ad0c9aa30.tar.xz linux-9b5752d1a882c96c0319aebe55bbfe9ad0c9aa30.zip |
misc: ti-st: don't check for tty data == NULL
tty data passed to tty_ldisc_ops::receive_buf() are never NULL. Remove
this check.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230731080244.2698-11-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ti-st/st_core.c | 3 | ||||
-rw-r--r-- | drivers/misc/ti-st/st_kim.c | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index e2add50b191c..3b2145722bd7 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c @@ -234,8 +234,7 @@ static void st_int_recv(void *disc_data, struct st_data_s *st_gdata = (struct st_data_s *)disc_data; unsigned long flags; - /* tty_receive sent null ? */ - if (unlikely(ptr == NULL) || (st_gdata == NULL)) { + if (st_gdata == NULL) { pr_err(" received null from TTY "); return; } diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 8c801897ffa2..5431a89924aa 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -135,11 +135,6 @@ static void kim_int_recv(struct kim_data_s *kim_gdata, pr_debug("%s", __func__); /* Decode received bytes here */ - if (unlikely(ptr == NULL)) { - pr_err(" received null from TTY "); - return; - } - while (count) { if (kim_gdata->rx_count) { len = min_t(unsigned int, kim_gdata->rx_count, count); |