diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-11 08:55:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-11 08:55:10 +0200 |
commit | 1cc18584e5acfd845464616b66fb2fd81eff467e (patch) | |
tree | 4b16a54c9dd234c5fe9efb9b346249003b588e09 /drivers/usb/serial/garmin_gps.c | |
parent | 57253ccd5831e7e5720c433437775c3e6b7d0c72 (diff) | |
parent | 2ef96a5bb12be62ef75b5828c0aab838ebb29cb8 (diff) | |
download | linux-1cc18584e5acfd845464616b66fb2fd81eff467e.tar.bz2 |
Merge 5.7-rc5 into tty-next
We need the tty fixes in here too.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r-- | drivers/usb/serial/garmin_gps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index ffd984142171..d63072fee099 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -1138,8 +1138,8 @@ static void garmin_read_process(struct garmin_data *garmin_data_p, send it directly to the tty port */ if (garmin_data_p->flags & FLAGS_QUEUING) { pkt_add(garmin_data_p, data, data_length); - } else if (bulk_data || - getLayerId(data) == GARMIN_LAYERID_APPL) { + } else if (bulk_data || (data_length >= sizeof(u32) && + getLayerId(data) == GARMIN_LAYERID_APPL)) { spin_lock_irqsave(&garmin_data_p->lock, flags); garmin_data_p->flags |= APP_RESP_SEEN; |