mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
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>
This commit is contained in:
parent
a60b301760
commit
9b5752d1a8
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user