diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/bluetooth/bcsp.c | 8 | ||||
| -rw-r--r-- | sys/dev/bluetooth/bth5.c | 8 | ||||
| -rw-r--r-- | sys/dev/bluetooth/btuart.c | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/sys/dev/bluetooth/bcsp.c b/sys/dev/bluetooth/bcsp.c index 960d21848ab..2b6aa9157a2 100644 --- a/sys/dev/bluetooth/bcsp.c +++ b/sys/dev/bluetooth/bcsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $ */ +/* $NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -387,8 +387,6 @@ bcspopen(dev_t device __unused, struct tty *tp) } } - KASSERT(tp->t_oproc != NULL); - cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK); for (unit = 0; unit < bcsp_cd.cd_ndevs; unit++) if (device_lookup(&bcsp_cd, unit) == NULL) @@ -597,7 +595,7 @@ bcsp_slip_transmit(struct tty *tp) sc->sc_stats.byte_tx += count; - if (tp->t_outq.c_cc != 0) + if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL) (*tp->t_oproc)(tp); return 0; diff --git a/sys/dev/bluetooth/bth5.c b/sys/dev/bluetooth/bth5.c index 030adc07151..06458b5611d 100644 --- a/sys/dev/bluetooth/bth5.c +++ b/sys/dev/bluetooth/bth5.c @@ -1,4 +1,4 @@ -/* $NetBSD: bth5.c,v 1.6 2019/11/16 22:06:49 mlelstv Exp $ */ +/* $NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $ */ /* * Copyright (c) 2017 Nathanial Sloss <nathanialsloss@yahoo.com.au> * All rights reserved. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.6 2019/11/16 22:06:49 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -392,8 +392,6 @@ bth5open(dev_t device __unused, struct tty *tp) } } - KASSERT(tp->t_oproc != NULL); - cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK); for (unit = 0; unit < bthfive_cd.cd_ndevs; unit++) if (device_lookup(&bthfive_cd, unit) == NULL) @@ -633,7 +631,7 @@ bth5_slip_transmit(struct tty *tp) sc->sc_stats.byte_tx += count; - if (tp->t_outq.c_cc != 0) + if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL) (*tp->t_oproc)(tp); return 0; diff --git a/sys/dev/bluetooth/btuart.c b/sys/dev/bluetooth/btuart.c index ac1a3a9bcc6..0bdd0aaaff4 100644 --- a/sys/dev/bluetooth/btuart.c +++ b/sys/dev/bluetooth/btuart.c @@ -1,4 +1,4 @@ -/* $NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $ */ +/* $NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $ */ /*- * Copyright (c) 2006, 2007 KIYOHARA Takashi @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -240,8 +240,6 @@ btuartopen(dev_t devno __unused, struct tty *tp) } } - KASSERT(tp->t_oproc != NULL); - cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK); for (unit = 0; unit < btuart_cd.cd_ndevs; unit++) if (device_lookup(&btuart_cd, unit) == NULL) @@ -543,7 +541,7 @@ btuartstart(struct tty *tp) sc->sc_stats.byte_tx += count; - if (tp->t_outq.c_cc != 0) + if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL) (*tp->t_oproc)(tp); return 0; |
