diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c index 3502f607117fcd2a8eb26ba34b46379fea5b4fb6..c669ec37483bf612107b57134b9df2deca7c719b 100644 --- a/drivers/net/caif/caif_serial.c +++ b/drivers/net/caif/caif_serial.c @@ -312,6 +312,10 @@ static int ldisc_open(struct tty_struct *tty) char name[64]; int result; + /* No write no play */ + if (tty->ops->write == NULL) + return -EOPNOTSUPP; + sprintf(name, "cf%s", tty->name); dev = alloc_netdev(sizeof(*ser), name, caifdev_setup); ser = netdev_priv(dev);